aboutsummaryrefslogtreecommitdiffstats
path: root/ffmpeg.c
diff options
context:
space:
mode:
authorCalcium <calcium@nurs.or.jp>2005-03-23 00:52:31 +0000
committerMichael Niedermayer <michaelni@gmx.at>2005-03-23 00:52:31 +0000
commitca80810bd9e94ea6b55451333d5890ebd7e2b27b (patch)
treeb05e3a5eedc90d93cfcda9eb557af0dd194520b2 /ffmpeg.c
parent6c13c880fa8c8867df7b6b46b8997807ddbbb7c3 (diff)
downloadffmpeg-ca80810bd9e94ea6b55451333d5890ebd7e2b27b.tar.gz
12_finish_encoding_at_shortest_stream_was_finished.patch by (Calcium | calcium nurs or jp)
Originally committed as revision 4064 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'ffmpeg.c')
-rw-r--r--ffmpeg.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/ffmpeg.c b/ffmpeg.c
index 38c8cfca08..ac974a2084 100644
--- a/ffmpeg.c
+++ b/ffmpeg.c
@@ -242,6 +242,7 @@ static int video_stream_copy = 0;
static int video_sync_method= 1;
static int audio_sync_method= 0;
static int copy_ts= 0;
+static int opt_shortest = 0; //
static int rate_emu = 0;
@@ -1891,7 +1892,7 @@ static int av_encode(AVFormatContext **output_files,
is = input_files[file_index];
if (av_read_frame(is, &pkt) < 0) {
file_table[file_index].eof_reached = 1;
- continue;
+ if (opt_shortest) break; else continue; //
}
if (!pkt.size) {
@@ -3935,6 +3936,7 @@ const OptionDef options[] = {
{ "vsync", HAS_ARG | OPT_INT | OPT_EXPERT, {(void*)&video_sync_method}, "video sync method", "" },
{ "async", HAS_ARG | OPT_INT | OPT_EXPERT, {(void*)&audio_sync_method}, "audio sync method", "" },
{ "copyts", OPT_BOOL | OPT_EXPERT, {(void*)&copy_ts}, "copy timestamps" },
+ { "shortest", OPT_BOOL | OPT_EXPERT, {(void*)&opt_shortest}, "finish encoding within shortest input" }, //
/* video options */
{ "b", HAS_ARG | OPT_VIDEO, {(void*)opt_video_bitrate}, "set video bitrate (in kbit/s)", "bitrate" },