[FFmpeg-devel] [PATCH] Add a CODEC_CAP_USE_INPUT_BUFFER capabilities flag

Stefano Sabatini stefano.sabatini-lala
Mon Oct 6 00:28:42 CEST 2008


Hi all,

the new flag will be useful for example in libavfilter when the output
frame is accessed *after* the call to av_packet_free().

For example it could be used like this:

    if (is->video_st->codec->codec->capabilities & CODEC_CAP_USE_INPUT_BUFFER)
        pkt->destruct = av_destruct_packet_nofree;
    av_free_packet(pkt);

This looks nicer than the use of a codec id check, even in the case
of rawdec being the only codec having this capability (I don't
know if there are other ones like this).

I'm omitting minor version bump in the patch.

Regards.
-- 
FFmpeg = Faboulous & Fiendish Merciful Portentous Energized Game
-------------- next part --------------
A non-text attachment was scrubbed...
Name: add-use-input-buffer-cap-00.patch
Type: text/x-diff
Size: 994 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20081006/06faa899/attachment.patch>



More information about the ffmpeg-devel mailing list