[FFmpeg-cvslog] r23625 - in trunk/libavformat: rtpenc.c rtpenc.h
Luca Abeni
lucabe72
Wed Jun 16 15:37:20 CEST 2010
Hi Ben,
On 06/16/2010 03:17 PM, Benoit Fouet wrote:
[...]
>> + case CODEC_ID_H264:
>> + /* check for H.264 MP4 syntax */
>> + if (st->codec->extradata_size> 0&& st->codec->extradata&&
>> + st->codec->extradata[0] == 1) {
>
> aren't the two first ones redundant?
You mean, the "st->codec->extradata_size> 0&& st->codec->extradata"?
I think I've seen cases in which extradata_size != 0 but extradata == NULL,
or vice-versa... So, better safe than sorry ;-)
Anyway, I can remove the "&& st->codec->extradata" if there is
agreement that this cannot happen.
>
>> + s->nal_length_size = (st->codec->extradata[4]& 0x03) + 1;
>> + }
> BTW, why not:
> if (st->codec->extradata_size> 4&& st->codec->extradata[0] == 1)
> s->nal_length_size = (st->codec->extradata[4]& 0x03) + 1;
You are right about the " > 4", yes. Sorry for not noticing it before.
I'll fix this soon.
Thanks,
Luca
More information about the ffmpeg-cvslog
mailing list