summaryrefslogtreecommitdiff
path: root/libavformat
diff options
context:
space:
mode:
authorBaptiste Coudurier <baptiste.coudurier@gmail.com>2006-04-14 09:54:17 +0000
committerBaptiste Coudurier <baptiste.coudurier@gmail.com>2006-04-14 09:54:17 +0000
commit611fd605a30d18711a464c0a3e4b208187f5c348 (patch)
treea1e1f9c134b3e26af6abd705e6d8bebdd534ff4a /libavformat
parent18c697acce485df010ec44b8c3b148c8f46656ca (diff)
get avcC profile and level indication from sps (from handbrake)
Originally committed as revision 5287 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat')
-rw-r--r--libavformat/movenc.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/libavformat/movenc.c b/libavformat/movenc.c
index 0ef047439f..a89ba9b622 100644
--- a/libavformat/movenc.c
+++ b/libavformat/movenc.c
@@ -433,13 +433,6 @@ static int mov_write_avcc_tag(ByteIOContext *pb, MOVTrack *track)
buf = track->vosData;
end = track->vosData + track->vosLen;
- put_byte(pb, 1); /* version */
- put_byte(pb, 77); /* profile */
- put_byte(pb, 64); /* profile compat */
- put_byte(pb, 30); /* level */
- put_byte(pb, 0xff); /* 6 bits reserved (111111) + 2 bits nal size length - 1 (11) */
- put_byte(pb, 0xe1); /* 3 bits reserved (111) + 5 bits number of sps (00001) */
-
/* look for sps and pps */
while (buf < end) {
unsigned int size;
@@ -457,6 +450,14 @@ static int mov_write_avcc_tag(ByteIOContext *pb, MOVTrack *track)
}
assert(sps);
assert(pps);
+
+ put_byte(pb, 1); /* version */
+ put_byte(pb, sps[1]); /* profile */
+ put_byte(pb, sps[2]); /* profile compat */
+ put_byte(pb, sps[3]); /* level */
+ put_byte(pb, 0xff); /* 6 bits reserved (111111) + 2 bits nal size length - 1 (11) */
+ put_byte(pb, 0xe1); /* 3 bits reserved (111) + 5 bits number of sps (00001) */
+
put_be16(pb, sps_size);
put_buffer(pb, sps, sps_size);
put_byte(pb, 1); /* number of pps */