aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBaptiste Coudurier <baptiste.coudurier@gmail.com>2007-12-19 16:00:08 +0000
committerBaptiste Coudurier <baptiste.coudurier@gmail.com>2007-12-19 16:00:08 +0000
commit79e42311d3b8a7e8efb85866c1cec120da6d0983 (patch)
tree3f53438a4a079f2b67c33e1474e9ecc72547ae57
parentbde246014f9dad89593fda39ffedf85b18bdd422 (diff)
downloadffmpeg-79e42311d3b8a7e8efb85866c1cec120da6d0983.tar.gz
use generic 'glbl' atom if extradata is present but no specific method is known
Originally committed as revision 11272 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r--libavformat/movenc.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/libavformat/movenc.c b/libavformat/movenc.c
index 1488858104..d0679e8417 100644
--- a/libavformat/movenc.c
+++ b/libavformat/movenc.c
@@ -322,6 +322,14 @@ static int mov_write_wave_tag(ByteIOContext *pb, MOVTrack* track)
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 @@ static int mov_write_audio_tag(ByteIOContext *pb, MOVTrack* track)
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 @@ static int mov_write_video_tag(ByteIOContext *pb, MOVTrack* track)
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);
}