[FFmpeg-devel] [PATCHv3] avcodec/v4l2: set sizeimage param for non-raw buffers [fixes #6716]

Mark Thompson sw at jkqxz.net
Thu Oct 5 02:14:04 EEST 2017


On 04/10/17 20:04, Jorge Ramirez-Ortiz wrote:
> Some V4L2 drivers fail to allocate buffers when sizeimage is not set
> to a max value. This is indeed the case for s5p-mfc [1]
> 
> Most drivers should be able to calculate this value from the frame
> dimensions and format - or at least have their own default.
> 
> However since this work around should not impact those drivers doing
> the "right thing" this commit just provides such a default.
> 
> The calculations were extracted from the v4l2 driver used to develop
> the ffmpeg v4l2_m2m support [2]. See venc.c and vdec.c
> 
> [1] linux.git/drivers/media/platform/s5p-mfc
> [2] linux.git/drivers/media/platform/qcom/venus/
> ---
>  libavcodec/v4l2_context.c | 28 ++++++++++++++++++++++++++--
>  1 file changed, 26 insertions(+), 2 deletions(-)

Applied.

Thanks,

- Mark


More information about the ffmpeg-devel mailing list