diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2005-08-15 14:22:43 +0000 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2005-08-15 14:22:43 +0000 |
commit | 30bc6613fed9592e81b04818cb3e6c95088460d1 (patch) | |
tree | 4bf6a1b588967fb4e176b9763731ed9478d93040 /ffmpeg.c | |
parent | af9da83b0e1192ae6163633f66c420a332e2932c (diff) | |
download | ffmpeg-30bc6613fed9592e81b04818cb3e6c95088460d1.tar.gz |
support fixing missing pts by parsing future frames
Originally committed as revision 4526 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'ffmpeg.c')
-rw-r--r-- | ffmpeg.c | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -211,6 +211,7 @@ static int frame_skip_cmp= FF_CMP_DCTMAX; extern int loop_input; /* currently a hack */ static int loop_output = AVFMT_NOOUTPUTLOOP; static int gray_only = 0; +static int genpts = 0; static int gop_size = 12; static int intra_only = 0; @@ -3031,6 +3032,9 @@ static void opt_input_file(const char *filename) print_error(filename, err); exit(1); } + + if(genpts) + ic->flags|= AVFMT_FLAG_GENPTS; /* If not enough info to get the stream parameters, we decode the first frames to get it. (used in mpeg case for example) */ @@ -4340,6 +4344,7 @@ const OptionDef options[] = { { "skip_cmp", OPT_INT | HAS_ARG | OPT_EXPERT | OPT_VIDEO, {(void*)&frame_skip_cmp}, "frame skip compare function", "compare function" }, { "gray", OPT_BOOL | OPT_EXPERT | OPT_VIDEO, { (void *)&gray_only }, "encode/decode grayscale" }, { "newvideo", OPT_VIDEO, {(void*)opt_new_video_stream}, "add a new video stream to the current output stream" }, + { "genpts", OPT_BOOL | OPT_EXPERT | OPT_VIDEO, { (void *)&genpts }, "generate pts" }, /* audio options */ { "ab", HAS_ARG | OPT_AUDIO, {(void*)opt_audio_bitrate}, "set audio bitrate (in kbit/s)", "bitrate", }, |