Revision 53ffdd14 libavformat/movenc.c

View differences:

libavformat/movenc.c
451 451
static int mov_write_video_tag(ByteIOContext *pb, MOVTrack* track)
452 452
{
453 453
    int pos = url_ftell(pb);
454
    char compressor_name[32];
454 455
    int tag;
455 456

  
456 457
    put_be32(pb, 0); /* size */
......
467 468
    put_be16(pb, 0); /* Reserved */
468 469
    put_be16(pb, 1); /* Data-reference index */
469 470

  
470
    put_be32(pb, 0); /* Reserved (= 02000c) */
471
    put_be32(pb, 0); /* Reserved ("SVis")*/
472
    put_be32(pb, 0); /* Reserved */
473
    put_be32(pb, 0); /* Reserved (400)*/
471
    put_be16(pb, 0); /* Codec stream version */
472
    put_be16(pb, 0); /* Codec stream revision (=0) */
473
    put_tag(pb, "FFMP"); /* Vendor */
474
    if(track->enc->codec_id == CODEC_ID_RAWVIDEO) {
475
        put_be32(pb, 0); /* Temporal Quality */
476
        put_be32(pb, 0x400); /* Spatial Quality = lossless*/
477
    } else {
478
        put_be32(pb, 0x200); /* Temporal Quality = normal */
479
        put_be32(pb, 0x200); /* Spatial Quality = normal */
480
    }
474 481
    put_be16(pb, track->enc->width); /* Video width */
475 482
    put_be16(pb, track->enc->height); /* Video height */
476
    put_be32(pb, 0x00480000); /* Reserved */
477
    put_be32(pb, 0x00480000); /* Reserved */
483
    put_be32(pb, 0x00480000); /* Horizontal resolution 72dpi */
484
    put_be32(pb, 0x00480000); /* Vertical resolution 72dpi */
478 485
    put_be32(pb, 0); /* Data size (= 0) */
479 486
    put_be16(pb, 1); /* Frame count (= 1) */
480 487
    
481
    put_be32(pb, 0); /* Reserved */
482
    put_be32(pb, 0); /* Reserved */
483
    put_be32(pb, 0); /* Reserved */
484
    put_be32(pb, 0); /* Reserved */
485
    put_be32(pb, 0); /* Reserved */
486
    put_be32(pb, 0); /* Reserved */
487
    put_be32(pb, 0); /* Reserved */
488
    put_be32(pb, 0); /* Reserved */
488
    memset(compressor_name,0,32);
489
    if (track->enc->codec->name)
490
        strncpy(compressor_name,track->enc->codec->name,31);
491
    put_byte(pb, FFMAX(strlen(compressor_name),32) );
492
    put_buffer(pb, compressor_name, 31);
489 493
    
490 494
    put_be16(pb, 0x18); /* Reserved */
491 495
    put_be16(pb, 0xffff); /* Reserved */

Also available in: Unified diff