]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/flacdec.c
dxva: support DXGI_FORMAT_420_OPAQUE decoding
[ffmpeg] / libavcodec / flacdec.c
index f73a32b46158a42971535b74b1547a9c97faca44..581c73efc806d67346716c76c59688243bafa474 100644 (file)
@@ -205,12 +205,12 @@ static int get_metadata_size(const uint8_t *buf, int buf_size)
     buf += 4;
     do {
         if (buf_end - buf < 4)
-            return 0;
+            return AVERROR_INVALIDDATA;
         flac_parse_block_header(buf, &metadata_last, NULL, &metadata_size);
         buf += 4;
         if (buf_end - buf < metadata_size) {
             /* need more data in order to read the complete header */
-            return 0;
+            return AVERROR_INVALIDDATA;
         }
         buf += metadata_size;
     } while (!metadata_last);