[vlc-commits] [Git][videolan/vlc][3.0.x] vpx: call vpx_codec_get_frame() on VPX_CODEC_CORRUPT_FRAME
Steve Lhomme (@robUx4)
gitlab at videolan.org
Fri Jul 31 07:21:44 UTC 2026
Steve Lhomme pushed to branch 3.0.x at VideoLAN / VLC
Commits:
c3e9adc0 by Steve Lhomme at 2026-07-31T06:56:08+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
(cherry picked from commit a24fb178ac2f39e82000914827938e9301ea16d0)
Signed-off-by: Steve Lhomme <robux4 at ycbcr.xyz>
- - - - -
1 changed file:
- modules/codec/vpx.c
Changes:
=====================================
modules/codec/vpx.c
=====================================
@@ -186,7 +186,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)
@@ -202,6 +202,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/c3e9adc04b531c4dd737ed608f88f2bf8740ccc6
--
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/c3e9adc04b531c4dd737ed608f88f2bf8740ccc6
You're receiving this email because of your account on code.videolan.org. Manage all notifications: https://code.videolan.org/-/profile/notifications | Help: https://code.videolan.org/help
More information about the vlc-commits
mailing list