[FFmpeg-devel] [PATCH 2/6] avcodec/nvdec: avoid needless copy of output frame
Wang Bin
wbsecg1 at gmail.com
Thu May 10 05:51:52 EEST 2018
>
>
>
> - offset += cpy.Height;
> + frame->buf[1] = av_buffer_create((uint8_t *)unmap_data,
> sizeof(*unmap_data),
> + nvdec_unmap_mapped_frame,
> (void*)devptr,
> + AV_BUFFER_FLAG_READONLY);
> + if (!frame->buf[1]) {
> + ret = AVERROR(ENOMEM);
> + goto copy_fail;
> }
>
>
If AVFrame.buf[i] is non-NULL, then buf[j] must be non-NULL for all j < i,
see libavutil/frame.h. So either change the comment in frame.h or change
your implementation is required
More information about the ffmpeg-devel
mailing list