[FFmpeg-devel] [RFC] ffplay dr1 + reget buffer issue

Jai Menon jmenon86
Sun May 23 17:35:04 CEST 2010


Hi,

Here's yet another ffplay issue i thought i'd post. Currently, the
ffplay input filter doesn't define a reget_buffer callback for codecs.
So codecs fallback to avcodec_default_reget_buffer which always tries
to obtain a new buffer and copy the old picture onto it. This used to
work fine for codecs which output rgb earlier because internal buffers
are always "reused". With current ffplay however, buffer_type is
FF_BUFFER_TYPE_USER which means that with every reget_buffer call, we
unnecessarily make get/release buffer calls. Also, since
av_picture_copy doesn't account for the single data pointer used for
rgb pixfmts, all codecs using reget_buffer and outputting rgb crash
with ffplay. I'm not sure which "solution" is preferable here (or if
there is something else which can be done), so attached are two
patches for the different issues. both of them fix the issue
independently. comments welcome.

-- 
Jai Menon
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ffplay-reget-buffer.diff
Type: text/x-patch
Size: 968 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20100523/6dca3489/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: picture-copy-rgb-fix.diff
Type: text/x-patch
Size: 1200 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20100523/6dca3489/attachment-0001.bin>



More information about the ffmpeg-devel mailing list