mpc: clip seeking timestamp in valid range
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
b9b97c2fb9
commit
a503afb11f
@ -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 */
|
||||
|
Loading…
Reference in New Issue
Block a user