[FFmpeg-devel] Question about av_frame_is_writable
Paul B Mahol
onemda at gmail.com
Sat Dec 12 13:03:39 CET 2015
On 12/12/15, Jean Delvare <jdelvare at suse.de> wrote:
> Hi all,
> Can av_frame_is_writable() ever return 1, and if so, when?
> Context: I am testing corner cases of the delogo filter. To my
> surprise, even for a simple test case such as:
> $ ffmpeg -f lavfi -i "color=color=white:size=24x24" -frames:v 1 -vf
> "delogo=7:3:8:8" -f image2 debug.png
> av_frame_is_writable() returns 0, which disables direct mode of the
> delogo filter and forces the allocation of a new buffer. My
> understanding was that we were trying to avoid allocation and data copy
> as much as possible, for performance reasons, and with such a simple
> filter graph I can't see why we can't modify the video data in-place.
> Can someone enlighten me?
Non-refcounted frames are never writable. And color source is made of one single
frame which is cloned multiple times.
Use different input file perhaps?
> Jean Delvare
> SUSE L3 Support
> ffmpeg-devel mailing list
> ffmpeg-devel at ffmpeg.org
More information about the ffmpeg-devel