aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat/utils.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2006-02-02 19:23:33 +0000
committerMichael Niedermayer <michaelni@gmx.at>2006-02-02 19:23:33 +0000
commit53f7c43fcc97f4e5178a707033cee8749eaf912e (patch)
tree18f7ea0d22b0b40d155cb7e5b7576376d87be629 /libavformat/utils.c
parentd8a91afd360084f9cb015beaf3d9e4d606bc9d2a (diff)
downloadffmpeg-53f7c43fcc97f4e5178a707033cee8749eaf912e.tar.gz
sanity checks for seeking
Originally committed as revision 4927 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/utils.c')
-rw-r--r--libavformat/utils.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/libavformat/utils.c b/libavformat/utils.c
index 1b6b339fe8..41abceacb4 100644
--- a/libavformat/utils.c
+++ b/libavformat/utils.c
@@ -1348,6 +1348,12 @@ int av_seek_frame_binary(AVFormatContext *s, int stream_index, int64_t target_ts
pos_limit= pos_max;
}
+ if(ts_min > ts_max){
+ return -1;
+ }else if(ts_min == ts_max){
+ pos_limit= pos_min;
+ }
+
no_change=0;
while (pos_min < pos_limit) {
#ifdef DEBUG_SEEK