| Index: patched-ffmpeg-mt/tests/seek_test.c
|
| ===================================================================
|
| --- patched-ffmpeg-mt/tests/seek_test.c (revision 41250)
|
| +++ patched-ffmpeg-mt/tests/seek_test.c (working copy)
|
| @@ -60,7 +60,7 @@
|
| int main(int argc, char **argv)
|
| {
|
| const char *filename;
|
| - AVFormatContext *ic;
|
| + AVFormatContext *ic = NULL;
|
| int i, ret, stream_id;
|
| int64_t timestamp;
|
| AVFormatParameters params, *ap= ¶ms;
|
| @@ -79,13 +79,6 @@
|
|
|
| filename = argv[1];
|
|
|
| - /* allocate the media context */
|
| - ic = avformat_alloc_context();
|
| - if (!ic) {
|
| - fprintf(stderr, "Memory error\n");
|
| - exit(1);
|
| - }
|
| -
|
| ret = av_open_input_file(&ic, filename, NULL, 0, ap);
|
| if (ret < 0) {
|
| fprintf(stderr, "cannot open %s\n", filename);
|
| @@ -112,6 +105,7 @@
|
| ts_str(dts_buf, pkt.dts, st->time_base);
|
| ts_str(ts_buf, pkt.pts, st->time_base);
|
| printf("ret:%-10s st:%2d flags:%d dts:%s pts:%s pos:%7" PRId64 " size:%6d", ret_str(ret), pkt.stream_index, pkt.flags, dts_buf, ts_buf, pkt.pos, pkt.size);
|
| + av_free_packet(&pkt);
|
| } else
|
| printf("ret:%s", ret_str(ret)); // necessary to avoid trailing whitespace
|
| printf("\n");
|
| @@ -132,5 +126,7 @@
|
| printf("ret:%-10s st:%2d flags:%d ts:%s\n", ret_str(ret), stream_id, i&1, ts_buf);
|
| }
|
|
|
| + av_close_input_file(ic);
|
| +
|
| return 0;
|
| }
|
|
|