[FFmpeg-devel] [PATCH] H264 parser fix
Fri May 28 21:59:14 CEST 2010
On Fri, May 28, 2010 at 12:53:48PM -0700, Howard Chu wrote:
> Michael Niedermayer wrote:
>> On Thu, May 27, 2010 at 09:29:52PM -0700, Howard Chu wrote:
>>> Michael Niedermayer wrote:
>>>> On Tue, May 25, 2010 at 08:49:13PM -0700, Howard Chu wrote:
>>>>> OK. Added an explicit flag to the H264Context for this instead. Still
>>>>> feels clumsy, it should have just been done in the parser_init step.
>>>>> it feels clumsy that it has to be parsed again, when the H264Context
>>>>> hanging off the AVCodecContext may already have it (due to
>>>>> ff_h264_decode_init() having parsed it already).
>>>>> There was a suggestion on IRC to add an av_parser_init2() API which
>>>>> provides the AVCodecContext, to be given to a new H264 parser_init2
>>>>> function. It could just fallback to passing the codec_id if a given
>>>>> doesn't implement the init2 function...
>>>> if that works iam nt against it but it will require apps to be updated
>>>> some files. not a big issue as far as iam concerned
>>> I decided it was too much trouble to add a new API for this. I also
>>> that mpeg4video_parser is already doing the same thing as the patch I
>>> posted, so I'm going to stick with that approach. Added a "first_picture"
>>> flag, which is used the same way as the flag in ParseContext1 used by
>>> I didn't add the flag to the end of the structure, didn't think it was
>>> necessary since H264Context is totally private.
>>> @@ -319,6 +327,7 @@
>>> H264Context *h = s->priv_data;
>>> h->thread_context = h;
>>> + h->first_picture = 1;
>> a variable that starts with 0 wouldnt need this
> Sorry, I jumped the gun and committed already since it was doing the same
> as existing (mpeg4video_parser) code.
> How's this for a cleanup...
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
When the tyrant has disposed of foreign enemies by conquest or treaty, and
there is nothing more to fear from them, then he is always stirring up
some war or other, in order that the people may require a leader. -- Plato
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 189 bytes
Desc: Digital signature
More information about the ffmpeg-devel