Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(527)

Unified Diff: patched-ffmpeg-mt/tests/seek_test.c

Issue 789004: ffmpeg roll of source to mar 9 version... (Closed) Base URL: svn://chrome-svn/chrome/trunk/deps/third_party/ffmpeg/
Patch Set: '' Created 10 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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= &params;
@@ -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;
}

Powered by Google App Engine
This is Rietveld 408576698