From 30bc6613fed9592e81b04818cb3e6c95088460d1 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Mon, 15 Aug 2005 14:22:43 +0000 Subject: support fixing missing pts by parsing future frames Originally committed as revision 4526 to svn://svn.ffmpeg.org/ffmpeg/trunk --- ffplay.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'ffplay.c') diff --git a/ffplay.c b/ffplay.c index 60b0b20858..967ad1fe5a 100644 --- a/ffplay.c +++ b/ffplay.c @@ -210,6 +210,7 @@ static int step = 0; static int thread_count = 1; static int workaround_bugs = 1; static int fast = 0; +static int genpts = 0; static int lowres = 0; static int idct = FF_IDCT_AUTO; static enum AVDiscard skip_frame= AVDISCARD_DEFAULT; @@ -1802,6 +1803,10 @@ static int decode_thread(void *arg) #else use_play = 0; #endif + + if(genpts) + ic->flags |= AVFMT_FLAG_GENPTS; + if (!use_play) { err = av_find_stream_info(ic); if (err < 0) { @@ -2356,6 +2361,7 @@ const OptionDef options[] = { { "bug", OPT_INT | HAS_ARG | OPT_EXPERT, {(void*)&workaround_bugs}, "workaround bugs", "" }, { "vismv", HAS_ARG | OPT_EXPERT, {(void*)opt_vismv}, "visualize motion vectors", "" }, { "fast", OPT_BOOL | OPT_EXPERT, {(void*)&fast}, "non spec compliant optimizations", "" }, + { "genpts", OPT_BOOL | OPT_EXPERT, {(void*)&genpts}, "generate pts", "" }, { "lowres", OPT_INT | HAS_ARG | OPT_EXPERT, {(void*)&lowres}, "", "" }, { "skiploop", OPT_INT | HAS_ARG | OPT_EXPERT, {(void*)&skip_loop_filter}, "", "" }, { "skipframe", OPT_INT | HAS_ARG | OPT_EXPERT, {(void*)&skip_frame}, "", "" }, -- cgit v1.2.3