[vlc-commits] [Git][videolan/vlc][master] vpx: call vpx_codec_get_frame() on VPX_CODEC_CORRUPT_FRAME

Steve Lhomme (@robUx4) gitlab at videolan.org
Tue May 12 22:25:02 UTC 2026



Steve Lhomme pushed to branch master at VideoLAN / VLC


Commits:
a24fb178 by Steve Lhomme at 2026-05-12T16:56:45+00:00
vpx: call vpx_codec_get_frame() on VPX_CODEC_CORRUPT_FRAME

Otherwise we release the PTS buffer but there is still a frame to be output
by the decoder which will point to the free'd PTS buffer.

Fixes #29837

- - - - -


1 changed file:

- modules/codec/vpx.c


Changes:

=====================================
modules/codec/vpx.c
=====================================
@@ -223,7 +223,7 @@ static int Decode(decoder_t *dec, block_t *block)
 
     block_Release(block);
 
-    if (err != VPX_CODEC_OK) {
+    if (err != VPX_CODEC_OK && err != VPX_CODEC_CORRUPT_FRAME) {
         free(pkt_pts);
         VPX_ERR(dec, ctx, "Failed to decode frame");
         if (err == VPX_CODEC_UNSUP_BITSTREAM)
@@ -239,6 +239,12 @@ static int Decode(decoder_t *dec, block_t *block)
         return VLCDEC_SUCCESS;
     }
 
+    if (err == VPX_CODEC_CORRUPT_FRAME) {
+        VPX_ERR(dec, ctx, "Failed to decode frame");
+        free(pkt_pts);
+        return VLCDEC_SUCCESS;
+    }
+
     /* fetches back the PTS */
     pkt_pts = img->user_priv;
     vlc_tick_t pts = *pkt_pts;



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

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




More information about the vlc-commits mailing list