Ticket #4988: 0001-v4l2-discard-corrupted-buffers-rebased.patch

File 0001-v4l2-discard-corrupted-buffers-rebased.patch, 525 bytes (added by Jack Cushman, 13 days ago)
  • libavdevice/v4l2.c

    diff --git a/libavdevice/v4l2.c b/libavdevice/v4l2.c
    index 2ca093b..89eb238 100644
    a b static int mmap_read_frame(AVFormatContext *ctx, AVPacket *pkt)  
    586586        av_log(ctx, AV_LOG_WARNING,
    587587               "Dequeued v4l2 buffer contains corrupted data (%d bytes).\n",
    588588               bytesused);
    589         bytesused = 0;
     589        res = enqueue_buffer(s, &buf);
     590        if (res)
     591            return res;
     592        return FFERROR_REDO;
    590593    } else
    591594#endif
    592595    {