diff options
author | Luca Abeni <lucabe72@email.it> | 2010-06-17 10:30:52 +0000 |
---|---|---|
committer | Luca Abeni <lucabe72@email.it> | 2010-06-17 10:30:52 +0000 |
commit | 8a2679ada43665f19eb8282e82f2acaad8ba4f84 (patch) | |
tree | 5946b25d2442d88ecb6720dc74b91637598f0b1f /libavformat | |
parent | 701935968d63b7f5b18828f6fd29c78e5b159752 (diff) | |
download | ffmpeg-8a2679ada43665f19eb8282e82f2acaad8ba4f84.tar.gz |
Simplify (no need to check for st->codec->extradata) and correct
(extradata_size must be at least 5 bytes) the H.264 MP4 syntax check
in rtpenc.c
Originally committed as revision 23638 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat')
-rw-r--r-- | libavformat/rtpenc.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/libavformat/rtpenc.c b/libavformat/rtpenc.c index 5abd490cc4..3a541dd283 100644 --- a/libavformat/rtpenc.c +++ b/libavformat/rtpenc.c @@ -133,8 +133,7 @@ static int rtp_write_header(AVFormatContext *s1) break; case CODEC_ID_H264: /* check for H.264 MP4 syntax */ - if (st->codec->extradata_size > 0 && st->codec->extradata && - st->codec->extradata[0] == 1) { + if (st->codec->extradata_size > 4 && st->codec->extradata[0] == 1) { s->nal_length_size = (st->codec->extradata[4] & 0x03) + 1; } break; |