]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/ac3_parser.c
lavc: Add coded bitstream read/write support for AV1
[ffmpeg] / libavcodec / ac3_parser.c
index f4618bf215ee481f3d51737165c527e7698eed33..1e203ae6ac233df247d799c562dc3f41a45c680d 100644 (file)
@@ -162,7 +162,9 @@ int avpriv_ac3_parse_header(AC3HeaderInfo **phdr, const uint8_t *buf,
         return AVERROR(ENOMEM);
     hdr = *phdr;
 
-    init_get_bits8(&gb, buf, size);
+    err = init_get_bits8(&gb, buf, size);
+    if (err < 0)
+        return AVERROR_INVALIDDATA;
     err = ff_ac3_parse_header(&gb, hdr);
     if (err < 0)
         return AVERROR_INVALIDDATA;