]> git.sesse.net Git - ffmpeg/blobdiff - libavdevice/v4l2.c
avcodec/flac_parser: Don't allocate array separately
[ffmpeg] / libavdevice / v4l2.c
index 1b9c6e760b419247ba95df33828012f45164acef..446a243cf8b7f9070ab57df1c728031b703c1f13 100644 (file)
@@ -538,11 +538,10 @@ static int mmap_read_frame(AVFormatContext *ctx, AVPacket *pkt)
             s->frame_size = buf.bytesused;
 
         if (s->frame_size > 0 && buf.bytesused != s->frame_size) {
-            av_log(ctx, AV_LOG_ERROR,
+            av_log(ctx, AV_LOG_WARNING,
                    "Dequeued v4l2 buffer contains %d bytes, but %d were expected. Flags: 0x%08X.\n",
                    buf.bytesused, s->frame_size, buf.flags);
-            enqueue_buffer(s, &buf);
-            return AVERROR_INVALIDDATA;
+            buf.bytesused = 0;
         }
     }
 
@@ -816,7 +815,7 @@ static int device_try_init(AVFormatContext *ctx,
     return ret;
 }
 
-static int v4l2_read_probe(AVProbeData *p)
+static int v4l2_read_probe(const AVProbeData *p)
 {
     if (av_strstart(p->filename, "/dev/video", NULL))
         return AVPROBE_SCORE_MAX - 1;