comparison movenc.c @ 2838:6bea49ef18b1 libavformat

use generic 'glbl' atom if extradata is present but no specific method is known
author bcoudurier
date Wed, 19 Dec 2007 16:00:08 +0000
parents ef333b18b760
children 73d9954285d5
comparison
equal deleted inserted replaced
2837:1caef0e2fb46 2838:6bea49ef18b1
320 put_be32(pb, 0); /* null tag */ 320 put_be32(pb, 0); /* null tag */
321 321
322 return updateSize (pb, pos); 322 return updateSize (pb, pos);
323 } 323 }
324 324
325 static int mov_write_glbl_tag(ByteIOContext *pb, MOVTrack* track)
326 {
327 put_be32(pb, track->vosLen+8);
328 put_tag(pb, "glbl");
329 put_buffer(pb, track->vosData, track->vosLen);
330 return 8+track->vosLen;
331 }
332
325 static int mov_write_audio_tag(ByteIOContext *pb, MOVTrack* track) 333 static int mov_write_audio_tag(ByteIOContext *pb, MOVTrack* track)
326 { 334 {
327 offset_t pos = url_ftell(pb); 335 offset_t pos = url_ftell(pb);
328 int version = track->mode == MODE_MOV && 336 int version = track->mode == MODE_MOV &&
329 (track->audio_vbr || 337 (track->audio_vbr ||
374 mov_write_wave_tag(pb, track); 382 mov_write_wave_tag(pb, track);
375 else if(track->enc->codec_id == CODEC_ID_AAC) 383 else if(track->enc->codec_id == CODEC_ID_AAC)
376 mov_write_esds_tag(pb, track); 384 mov_write_esds_tag(pb, track);
377 else if(track->enc->codec_id == CODEC_ID_AMR_NB) 385 else if(track->enc->codec_id == CODEC_ID_AMR_NB)
378 mov_write_amr_tag(pb, track); 386 mov_write_amr_tag(pb, track);
387 else if(track->vosLen > 0)
388 mov_write_glbl_tag(pb, track);
379 389
380 return updateSize (pb, pos); 390 return updateSize (pb, pos);
381 } 391 }
382 392
383 static int mov_write_d263_tag(ByteIOContext *pb) 393 static int mov_write_d263_tag(ByteIOContext *pb)
674 mov_write_svq3_tag(pb); 684 mov_write_svq3_tag(pb);
675 else if(track->enc->codec_id == CODEC_ID_H264) 685 else if(track->enc->codec_id == CODEC_ID_H264)
676 mov_write_avcc_tag(pb, track); 686 mov_write_avcc_tag(pb, track);
677 else if(track->enc->codec_id == CODEC_ID_DNXHD) 687 else if(track->enc->codec_id == CODEC_ID_DNXHD)
678 mov_write_avid_tag(pb, track); 688 mov_write_avid_tag(pb, track);
689 else if(track->vosLen > 0)
690 mov_write_glbl_tag(pb, track);
679 691
680 return updateSize (pb, pos); 692 return updateSize (pb, pos);
681 } 693 }
682 694
683 static int mov_write_stsd_tag(ByteIOContext *pb, MOVTrack* track) 695 static int mov_write_stsd_tag(ByteIOContext *pb, MOVTrack* track)