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?
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel