# HG changeset patch # User lucabe # Date 1276770652 0 # Node ID 397ef451b549b7da4823d47e8dfb859ea8d48a78 # Parent 6fa300e438f37ba0954233d63e963a1fca76254a 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 diff -r 6fa300e438f3 -r 397ef451b549 rtpenc.c --- a/rtpenc.c Thu Jun 17 09:39:42 2010 +0000 +++ b/rtpenc.c Thu Jun 17 10:30:52 2010 +0000 @@ -133,8 +133,7 @@ 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;