[FFmpeg-devel] Splitting an MPEG{1,2} frame in slices

Michael Niedermayer michaelni
Tue Aug 21 18:37:23 CEST 2007


Hi

On Tue, Aug 21, 2007 at 04:41:55PM +0200, Luca Abeni wrote:
> Hi Michael,
> 
> Michael Niedermayer wrote:
> [...]
> >> I can parse the video frame "by hand", searching for "0x000001" 
> >> sequences, but I want to avoid replicating some already existing code, 
> >> so I am wondering if libavcodec already provides functions for splitting 
> >> MPEG{1,2} video frames in slices.
> > 
> > ff_find_start_code() could come in handy
> 
> Thanks for the hint: this is what I needed.
> Only one question: it seems that the "state" parameter is both an input 
> and an output parameter. How should I set it before calling 
> ff_find_start_code()?

0xDEADBEEF
-1
0x31415927
0x12345678
basically anything that isnt (part of) a valid startcode


> I see that it is sometimes set to -1... I assume this is what I want.
> BTW: I also noticed that libavcodec/cavsdec.c:cavs_decode_frame() calls 
> ff_find_start_code() without initializing such parameter... Is this safe?

truely uninitalized is not good ...

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

There will always be a question for which you do not know the correct awnser.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20070821/fddb3598/attachment.pgp>



More information about the ffmpeg-devel mailing list