[vlc-commits] [Git][videolan/vlc][3.0.x] dav1d: continue decoding on recoverable errors

Jean-Baptiste Kempf (@jbk) gitlab at videolan.org
Thu Feb 17 06:25:47 UTC 2022



Jean-Baptiste Kempf pushed to branch 3.0.x at VideoLAN / VLC


Commits:
b15e4043 by Ronald S. Bultje at 2022-02-15T20:00:02+01:00
dav1d: continue decoding on recoverable errors

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

(cherry picked from commit e890cc923355b87d4c40d035dbf16a4924fe95b2)
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

- - - - -


1 changed file:

- modules/codec/dav1d.c


Changes:

=====================================
modules/codec/dav1d.c
=====================================
@@ -226,7 +226,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/b15e4043c672e2059318114152b78b24f6fca73e

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


VideoLAN code repository instance


More information about the vlc-commits mailing list