[FFmpeg-devel] trac issue #251 and AVFMT_RAWPICTURE

Michael Niedermayer michaelni at gmx.at
Mon May 30 14:45:49 CEST 2011


On Mon, May 30, 2011 at 01:27:42AM +0200, Stefano Sabatini wrote:
> Hi,
> 
> curiously today is the second time I step into the AVFMT_RAWPICTURE
> flag.
> 
> yuv4mpeg is currently segfaulting with -vcodec copy, that's because
> the code which converts AVFrame -> AVPicture in
> ffmpeg.c:do_video_out() is not executed, and the code in
> yuv4_write_packet:
> 
>    picture = (AVPicture *)pkt->data;
>    ...
>    ptr = pkt->data[0];
>    ...
> 
>    ptr = picture->data[0]; => set to NULL
>    for(i=0;i<height;i++) {
>         avio_write(pb, ptr, width);
>         ptr += picture->linesize[0];
>     }
> 
> fails with a crash.
> 
> AVFMT_RAWPICTURE is currently used only in yuv4mpeg and in nullenc
> (where it is not even required), so I wonder if it would make sense to
> simply drop the flag (and simplify the API, which is currently
> complicated for so small gain).

i dont know
if AVFMT_RAWPICTURE could be used more widespread and would allow
avoiding a memcpy() it might be better tio keep it otherwise i guess
we should drop it

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

Everything should be made as simple as possible, but not simpler.
-- Albert Einstein
-------------- 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/20110530/a55a7d7d/attachment.asc>


More information about the ffmpeg-devel mailing list