[FFmpeg-devel] [PATCH] CrystalHD: Fix usage of h264 parser.

Michael Niedermayer michaelni at gmx.at
Fri Apr 15 11:16:25 CEST 2011


On Thu, Apr 14, 2011 at 09:21:20PM -0700, Philip Langdale wrote:
> On Fri, 15 Apr 2011 05:09:23 +0200
> Michael Niedermayer <michaelni at gmx.at> wrote:
> 
> > 
> > Theres a code example above the
> > 
> > av_parser_parse2() function in libavcodec/avcodec.h
> > your code does not seem correct if iam not too tired
> 
> My code is likely wrong, but the 'pos' parameter is confusing
> me. It is described as the "input byte position in stream" but
> the example doesn't advance it inside the while loop, which
> seems illogical. The implementation of parse2() seems to just
> pass it around on behalf of the caller without using it, except
> when initializing cur_offset. At this point, I don't know what
> I should pass for the pos value, but perhaps it doesn't matter.

IIRC pos is just reordered so if you dont use the one comming out
then it shouldnt matter what goes in


>
> I haven't found a real world example of the api being used.

grep for av_parser_parse2() in libavformat/utils.c


[...]

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

The misfortune of the wise is better than the prosperity of the fool.
-- Epicurus
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20110415/5822a6ca/attachment.asc>


More information about the ffmpeg-devel mailing list