[vlc-commits] [Git][videolan/vlc][master] dav1d: continue decoding on recoverable errors

Hugo Beauzée-Luyssen (@chouquette) gitlab at videolan.org
Thu Feb 10 13:48:46 UTC 2022



Hugo Beauzée-Luyssen pushed to branch master at VideoLAN / VLC


Commits:
e890cc92 by Ronald S. Bultje at 2022-02-10T13:12:22+00:00
dav1d: continue decoding on recoverable errors

Fixes #26259 (closed), #26579 and dav1d/#383.

- - - - -


1 changed file:

- modules/codec/dav1d.c


Changes:

=====================================
modules/codec/dav1d.c
=====================================
@@ -322,7 +322,18 @@ static int Decode(decoder_t *dec, block_t *block)
             if (res < 0 && res != DAV1D_ERR(EAGAIN))
             {
                 msg_Err(dec, "Decoder feed error %d!", res);
-                i_ret = VLC_EGENERIC;
+                /* bitstream decoding errors (typically DAV1D_ERR(EINVAL), are assumed
+                 * to be recoverable. Other errors returned from this function are either
+                 * unexpected within the VLC configuration, or considered critical failures:
+                 * - EAGAIN is handled above.
+                 * - ENOMEM means out-of-memory and is unrecoverable.
+                 * - ENOPROTOOPT is a build or configuration error (invalid demuxer/muxer or unsupported bitdepth) and is unrecoverable.
+                 * - ERANGE means frame size limits exceeded. VLC doesn't use this so we can ignore this, but unless size changes, it would be unrecoverable.
+                 * - EINVAL is any other bitstream error which is basically what this is about.
+                 * - EIO means file count not be opened and is unrecoverable.
+                 * - ENOENT  is actually only returned by dav1d_parse_sequence_header(), which is outside this context (I think?).
+                 * - read() can return other values but it's OK to consider these critical for now. */
+                i_ret = res == DAV1D_ERR(EINVAL) ? VLCDEC_SUCCESS : VLCDEC_ECRITICAL;
                 break;
             }
         }



View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/e890cc923355b87d4c40d035dbf16a4924fe95b2

-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/e890cc923355b87d4c40d035dbf16a4924fe95b2
You're receiving this email because of your account on code.videolan.org.




More information about the vlc-commits mailing list