diff options
author | wm4 <wm4@nowhere> | 2013-07-24 19:47:05 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2013-07-24 19:47:05 +0200 |
commit | 202b9e8069c3eeb7fba6cc8ed27d0e7e14c4ab6d (patch) | |
tree | f13eb6339519e926aa8bdb050d2562a33abe666f /video/filter/vf_dlopen.c | |
parent | 31c271f4ad1c0ee2af8d1223243f0606ef3aa735 (diff) | |
download | mpv-202b9e8069c3eeb7fba6cc8ed27d0e7e14c4ab6d.tar.bz2 mpv-202b9e8069c3eeb7fba6cc8ed27d0e7e14c4ab6d.tar.xz |
mp_image: create AVBuffers for all planes when converting to AVFrame
It appears the API requires you to cover all plane data with AVBuffers
(that is, one AVBuffer per plane in the most general case), because
certain code can make certain assumptions about this. (Insert rant
about how this is barely useful and increases complexity and potential
bugs.) I don't know any cases where the current code actually fails,
but we want to follow the API, so do it anyway.
Note that we don't really know whether or not planes are from a single
memory allocation, so we have to assume the most general case and create
an AVBuffer for each plane. We simply assume that the data is padded to
the full stride in the last image line. All these extra dummy references
are stupid, but the code might become much simpler once we only support
libavcodec versions with refcounting and can use AVFrame directly.
Diffstat (limited to 'video/filter/vf_dlopen.c')
0 files changed, 0 insertions, 0 deletions