Mercurial > libavformat.hg
changeset 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 | 1caef0e2fb46 |
children | b51319dd86e5 |
files | movenc.c |
diffstat | 1 files changed, 12 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/movenc.c Wed Dec 19 15:39:10 2007 +0000 +++ b/movenc.c Wed Dec 19 16:00:08 2007 +0000 @@ -322,6 +322,14 @@ return updateSize (pb, pos); } +static int mov_write_glbl_tag(ByteIOContext *pb, MOVTrack* track) +{ + put_be32(pb, track->vosLen+8); + put_tag(pb, "glbl"); + put_buffer(pb, track->vosData, track->vosLen); + return 8+track->vosLen; +} + static int mov_write_audio_tag(ByteIOContext *pb, MOVTrack* track) { offset_t pos = url_ftell(pb); @@ -376,6 +384,8 @@ mov_write_esds_tag(pb, track); else if(track->enc->codec_id == CODEC_ID_AMR_NB) mov_write_amr_tag(pb, track); + else if(track->vosLen > 0) + mov_write_glbl_tag(pb, track); return updateSize (pb, pos); } @@ -676,6 +686,8 @@ mov_write_avcc_tag(pb, track); else if(track->enc->codec_id == CODEC_ID_DNXHD) mov_write_avid_tag(pb, track); + else if(track->vosLen > 0) + mov_write_glbl_tag(pb, track); return updateSize (pb, pos); }