mirror of
https://github.com/nyanmisaka/ffmpeg-rockchip.git
synced 2026-01-23 23:21:06 +01:00
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
This commit is contained in:
parent
701935968d
commit
8a2679ada4
1 changed files with 1 additions and 2 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue