summaryrefslogtreecommitdiff
path: root/avconv.c
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2011-08-19 17:52:46 +0200
committerAlex Converse <alex.converse@gmail.com>2011-08-19 15:36:05 -0700
commitb62b5cb6fd5f97b7c1cd9b84f183d458e97622a9 (patch)
tree4566bf1df10d3a65d297daa54cd6e27719e43a9c /avconv.c
parentc09315084973fb9ee1c2cfdd385d0f35723ed29a (diff)
avconv: call flush_encoders() from transcode() directly.
And remove now pointless parameter. Signed-off-by: Alex Converse <alex.converse@gmail.com>
Diffstat (limited to 'avconv.c')
-rw-r--r--avconv.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/avconv.c b/avconv.c
index c8ffd64156..11d77419eb 100644
--- a/avconv.c
+++ b/avconv.c
@@ -1397,7 +1397,7 @@ static void generate_silence(uint8_t* buf, enum AVSampleFormat sample_fmt, size_
memset(buf, fill_char, size);
}
-static void flush_encoders(int ist_index, OutputStream *ost_table, int nb_ostreams)
+static void flush_encoders(OutputStream *ost_table, int nb_ostreams)
{
int i, ret;
@@ -1406,7 +1406,7 @@ static void flush_encoders(int ist_index, OutputStream *ost_table, int nb_ostrea
AVCodecContext *enc = ost->st->codec;
AVFormatContext *os = output_files[ost->file_index].ctx;
- if (ost->source_index != ist_index || !ost->encoding_needed)
+ if (!ost->encoding_needed)
continue;
if (ost->st->codec->codec_type == AVMEDIA_TYPE_AUDIO && enc->frame_size <=1)
@@ -1797,10 +1797,6 @@ static int output_packet(InputStream *ist, int ist_index,
}
}
discard_packet:
- if (pkt == NULL) {
- /* EOF handling */
- flush_encoders(ist_index, ost_table, nb_ostreams);
- }
return 0;
}
@@ -2371,6 +2367,7 @@ static int transcode(OutputFile *output_files,
output_packet(ist, i, output_streams, nb_output_streams, NULL);
}
}
+ flush_encoders(output_streams, nb_output_streams);
term_exit();