summaryrefslogtreecommitdiff
path: root/ffplay.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2005-08-15 14:22:43 +0000
committerMichael Niedermayer <michaelni@gmx.at>2005-08-15 14:22:43 +0000
commit30bc6613fed9592e81b04818cb3e6c95088460d1 (patch)
tree4bf6a1b588967fb4e176b9763731ed9478d93040 /ffplay.c
parentaf9da83b0e1192ae6163633f66c420a332e2932c (diff)
support fixing missing pts by parsing future frames
Originally committed as revision 4526 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'ffplay.c')
-rw-r--r--ffplay.c6
1 files changed, 6 insertions, 0 deletions
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}, "", "" },