Ticket #4030: 0001-lavd-v4l2-print-buffer-flags-in-case-of-error.patch

File 0001-lavd-v4l2-print-buffer-flags-in-case-of-error.patch, 982 bytes (added by holden, 12 years ago)
  • libavdevice/v4l2.c

    From 1b471609878a9982960bf25e921c560e595ad667 Mon Sep 17 00:00:00 2001
    From: Giorgio Vazzana <mywing81@gmail.com>
    Date: Thu, 16 Oct 2014 11:10:03 +0200
    Subject: [PATCH] lavd/v4l2: print buffer flags in case of error
    
    ---
     libavdevice/v4l2.c |    4 ++--
     1 file changed, 2 insertions(+), 2 deletions(-)
    
    diff --git a/libavdevice/v4l2.c b/libavdevice/v4l2.c
    index cf7a92c..d6fc79f 100644
    a b static int mmap_read_frame(AVFormatContext *ctx, AVPacket *pkt)  
    525525
    526526    if (s->frame_size > 0 && buf.bytesused != s->frame_size) {
    527527        av_log(ctx, AV_LOG_ERROR,
    528                "The v4l2 frame is %d bytes, but %d bytes are expected\n",
    529                buf.bytesused, s->frame_size);
     528               "The v4l2 frame is %d bytes, but %d bytes are expected. Flags: 0x%08X\n",
     529               buf.bytesused, s->frame_size, buf.flags);
    530530        enqueue_buffer(s, &buf);
    531531        return AVERROR_INVALIDDATA;
    532532    }