[FFmpeg-cvslog] r23638 - trunk/libavformat/rtpenc.c
lucabe
subversion
Thu Jun 17 12:30:52 CEST 2010
Author: lucabe
Date: Thu Jun 17 12:30:52 2010
New Revision: 23638
Log:
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
Modified:
trunk/libavformat/rtpenc.c
Modified: trunk/libavformat/rtpenc.c
==============================================================================
--- trunk/libavformat/rtpenc.c Thu Jun 17 12:13:11 2010 (r23637)
+++ trunk/libavformat/rtpenc.c Thu Jun 17 12:30:52 2010 (r23638)
@@ -133,8 +133,7 @@ static int rtp_write_header(AVFormatCont
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;
More information about the ffmpeg-cvslog
mailing list