diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2012-08-27 06:51:27 +0400 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-08-27 06:51:27 +0400 |
commit | a503afb11f80facc0fa12b733c5c58989950b108 (patch) | |
tree | 31b0c29f2faea16f946f5712580e9ac63ba9ff57 /libavformat/mpc.c | |
parent | b9b97c2fb916982c87b74821117fc6c41a80aa7e (diff) |
mpc: clip seeking timestamp in valid range
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/mpc.c')
-rw-r--r-- | libavformat/mpc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/mpc.c b/libavformat/mpc.c index 4ebc6ae184..2ca8dfa4dd 100644 --- a/libavformat/mpc.c +++ b/libavformat/mpc.c @@ -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 */ |