diff options
author | Diego 'Flameeyes' Pettenò <flameeyes@gmail.com> | 2008-03-01 03:05:13 +0100 |
---|---|---|
committer | Diego 'Flameeyes' Pettenò <flameeyes@gmail.com> | 2008-03-01 03:05:13 +0100 |
commit | 1d0b3b20c34517b9d1ddf3ea347776304b0c4b44 (patch) | |
tree | 89f4fc640c2becc6f00ae08996754952ecf149c1 /contrib/ffmpeg/tests/seek_test.c | |
parent | 09496ad3469a0ade8dbd9a351e639b78f20b7942 (diff) | |
download | xine-lib-1d0b3b20c34517b9d1ddf3ea347776304b0c4b44.tar.gz xine-lib-1d0b3b20c34517b9d1ddf3ea347776304b0c4b44.tar.bz2 |
Update internal FFmpeg copy.
Diffstat (limited to 'contrib/ffmpeg/tests/seek_test.c')
-rw-r--r-- | contrib/ffmpeg/tests/seek_test.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/contrib/ffmpeg/tests/seek_test.c b/contrib/ffmpeg/tests/seek_test.c index e17409439..b1a2c939a 100644 --- a/contrib/ffmpeg/tests/seek_test.c +++ b/contrib/ffmpeg/tests/seek_test.c @@ -23,12 +23,18 @@ #include "avformat.h" +#undef exit + int main(int argc, char **argv) { const char *filename; AVFormatContext *ic; int i, ret, stream_id; int64_t timestamp; + AVFormatParameters params, *ap= ¶ms; + memset(ap, 0, sizeof(params)); + ap->channels=1; + ap->sample_rate= 22050; /* initialize libavcodec, and register all codecs and formats */ av_register_all(); @@ -48,9 +54,9 @@ int main(int argc, char **argv) exit(1); } - ret = av_open_input_file(&ic, filename, NULL, 0, NULL); + ret = av_open_input_file(&ic, filename, NULL, 0, ap); if (ret < 0) { - fprintf(stderr, "cant open %s\n", filename); + fprintf(stderr, "cannot open %s\n", filename); exit(1); } @@ -70,7 +76,7 @@ int main(int argc, char **argv) printf("ret:%2d", ret); if(ret>=0){ st= ic->streams[pkt.stream_index]; - printf(" st:%2d dts:%f pts:%f pos:%Ld size:%d flags:%d", pkt.stream_index, pkt.dts*av_q2d(st->time_base), pkt.pts*av_q2d(st->time_base), pkt.pos, pkt.size, pkt.flags); + printf(" st:%2d dts:%f pts:%f pos:%" PRId64 " size:%d flags:%d", pkt.stream_index, pkt.dts*av_q2d(st->time_base), pkt.pts*av_q2d(st->time_base), pkt.pos, pkt.size, pkt.flags); } printf("\n"); } |