[FFmpeg-devel] [PATCHv3 4/4] libavcodec: v4l2: add support for v4l2 mem2mem codecs

Jorge Ramirez jorge.ramirez-ortiz at linaro.org
Mon Aug 7 21:58:49 EEST 2017


On 08/03/2017 01:53 AM, Mark Thompson wrote:
>> +
>> +static int v4lbuf_to_avframe(AVFrame *frame, V4LBuffer *avbuf)
>> +{
>> +    int i, ret;
>> +
>> +    av_frame_unref(frame);
>> +
>> +    for (i = 0; i < avbuf->num_planes; i++) {
>> +        ret = v4l2bufref(avbuf, i, &frame->buf[i]);> +        if (ret)
>> +            return ret;
>> +
>> +        frame->linesize[i] = avbuf->bytesperline[i];
>> +        frame->data[i] = frame->buf[i]->data;
>> +
>> +        if (avbuf->num_planes == 1) {
>> +            if (avbuf->pool->av_pix_fmt == AV_PIX_FMT_NV12) {
> Special-casing like this rather inspires doubt that other formats are handled correctly.
>
I dont disagree with you but this was the only way I could play the 
decoded videos with ffplay. do you think this could be an ffplay issue?



More information about the ffmpeg-devel mailing list