Commit d4f413cb authored by lucabe's avatar lucabe

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


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@23638 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent 723ee2b5
...@@ -133,8 +133,7 @@ static int rtp_write_header(AVFormatContext *s1) ...@@ -133,8 +133,7 @@ static int rtp_write_header(AVFormatContext *s1)
break; break;
case CODEC_ID_H264: case CODEC_ID_H264:
/* check for H.264 MP4 syntax */ /* check for H.264 MP4 syntax */
if (st->codec->extradata_size > 0 && st->codec->extradata && if (st->codec->extradata_size > 4 && st->codec->extradata[0] == 1) {
st->codec->extradata[0] == 1) {
s->nal_length_size = (st->codec->extradata[4] & 0x03) + 1; s->nal_length_size = (st->codec->extradata[4] & 0x03) + 1;
} }
break; break;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment