mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-01-24 13:56:33 +02:00
avcodec/decode: ignore unsupported skip samples packet side data values
Same as in the AV_FRAME_FLAG_DISCARD codepath, ensure avci->skip_samples is not negative. Signed-off-by: James Almer <jamrial@gmail.com>
This commit is contained in:
parent
3b9bd63ad9
commit
22d6d2b481
@ -366,6 +366,7 @@ static inline int decode_simple_internal(AVCodecContext *avctx, AVFrame *frame,
|
||||
side= av_packet_get_side_data(avci->last_pkt_props, AV_PKT_DATA_SKIP_SAMPLES, &side_size);
|
||||
if(side && side_size>=10) {
|
||||
avci->skip_samples = AV_RL32(side) * avci->skip_samples_multiplier;
|
||||
avci->skip_samples = FFMAX(0, avci->skip_samples);
|
||||
discard_padding = AV_RL32(side + 4);
|
||||
av_log(avctx, AV_LOG_DEBUG, "skip %d / discard %d samples due to side data\n",
|
||||
avci->skip_samples, (int)discard_padding);
|
||||
|
Loading…
x
Reference in New Issue
Block a user