diff options
author | Anton Khirnov <anton@khirnov.net> | 2012-04-02 20:13:29 +0200 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2012-04-15 20:37:47 +0200 |
commit | 9e8aae443b4b3f377ccb038a6444f4c33dc5dc78 (patch) | |
tree | 2147f294e73af7257dcd33e481666ed20d7a2975 /avconv.c | |
parent | 89605e4aa018f75fef1de531449383b0e9d1bfe1 (diff) | |
download | ffmpeg-9e8aae443b4b3f377ccb038a6444f4c33dc5dc78.tar.gz |
avconv: flush decoders immediately after an EOF.
Prevents extensive buffering when overlaying a single picture.
Diffstat (limited to 'avconv.c')
-rw-r--r-- | avconv.c | 9 |
1 files changed, 8 insertions, 1 deletions
@@ -3054,6 +3054,13 @@ static int transcode(void) } if (ret < 0) { input_files[file_index]->eof_reached = 1; + + for (i = 0; i < input_files[file_index]->nb_streams; i++) { + ist = input_streams[input_files[file_index]->ist_index + i]; + if (ist->decoding_needed) + output_packet(ist, NULL); + } + if (opt_shortest) break; else @@ -3125,7 +3132,7 @@ static int transcode(void) /* at the end of stream, we must flush the decoder buffers */ for (i = 0; i < nb_input_streams; i++) { ist = input_streams[i]; - if (ist->decoding_needed) { + if (!input_files[ist->file_index]->eof_reached && ist->decoding_needed) { output_packet(ist, NULL); } } |