diff --git a/libavformat/seek-test.c b/libavformat/seek-test.c index ccfe90f5ce..49ac3ac06d 100644 --- a/libavformat/seek-test.c +++ b/libavformat/seek-test.c @@ -61,18 +61,25 @@ int main(int argc, char **argv) const char *filename; AVFormatContext *ic = NULL; int i, ret, stream_id; + int j; int64_t timestamp; AVDictionary *format_opts = NULL; - int64_t seekfirst; + int64_t seekfirst = AV_NOPTS_VALUE; int firstback=0; + int frame_count = 1; - if(argc == 4 && !strcmp(argv[2], "-seekforw")){ - seekfirst = atoi(argv[3]); - } else if(argc == 4 && !strcmp(argv[2], "-seekback")){ - seekfirst = atoi(argv[3]); - firstback = 1; - } else - seekfirst = AV_NOPTS_VALUE; + for(i=2; i=0){ + for(j=0; j=0){ char dts_buf[60]; @@ -122,6 +130,7 @@ int main(int argc, char **argv) } else printf("ret:%s", ret_str(ret)); // necessary to avoid trailing whitespace printf("\n"); + } } if(i>25) break;