diff options
author | James Almer <jamrial@gmail.com> | 2022-01-31 22:56:45 -0300 |
---|---|---|
committer | James Almer <jamrial@gmail.com> | 2022-02-05 09:44:59 -0300 |
commit | 3b9bd63ad92967e06d5e2f67e0cfd9093bf7700d (patch) | |
tree | 10590008e4fcec49680ecb46ef85025d67927bdf | |
parent | 8a9d3d3dec74568a1a7f226dab3a779cd0bfc079 (diff) | |
download | ffmpeg-3b9bd63ad92967e06d5e2f67e0cfd9093bf7700d.tar.gz |
avformat/demux: don't propagate unsupported skip samples packet side data values
Should fix ticket #9622
Signed-off-by: James Almer <jamrial@gmail.com>
-rw-r--r-- | libavformat/demux.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/libavformat/demux.c b/libavformat/demux.c index f895f0ba85..09d539af68 100644 --- a/libavformat/demux.c +++ b/libavformat/demux.c @@ -1354,6 +1354,7 @@ static int read_frame_internal(AVFormatContext *s, AVPacket *pkt) } if (sti->start_skip_samples && (pkt->pts == 0 || pkt->pts == RELATIVE_TS_BASE)) sti->skip_samples = sti->start_skip_samples; + sti->skip_samples = FFMAX(0, sti->skip_samples); if (sti->skip_samples || discard_padding) { uint8_t *p = av_packet_new_side_data(pkt, AV_PKT_DATA_SKIP_SAMPLES, 10); if (p) { |