mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2026-01-06 22:25:36 +01:00
mpc: clip seeking timestamp in valid range
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
@@ -194,7 +194,7 @@ static int mpc_read_seek(AVFormatContext *s, int stream_index, int64_t timestamp
|
||||
MPCContext *c = s->priv_data;
|
||||
AVPacket pkt1, *pkt = &pkt1;
|
||||
int ret;
|
||||
int index = av_index_search_timestamp(st, timestamp - DELAY_FRAMES, flags);
|
||||
int index = av_index_search_timestamp(st, FFMAX(timestamp - DELAY_FRAMES, 0), flags);
|
||||
uint32_t lastframe;
|
||||
|
||||
/* if found, seek there */
|
||||
|
||||
Reference in New Issue
Block a user