Mercurial > libavformat.hg
diff rtpenc.c @ 6139:397ef451b549 libavformat
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
| author | lucabe |
|---|---|
| date | Thu, 17 Jun 2010 10:30:52 +0000 |
| parents | 6c0e0ad77315 |
| children | 956f2e2cd288 |
line wrap: on
line diff
--- 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;
