[FFmpeg-cvslog] ffmpeg: always init output stream before reaping filters
Marton Balint
git at videolan.org
Sun Nov 12 23:16:36 EET 2017
ffmpeg | branch: release/3.4 | Marton Balint <cus at passwd.hu> | Wed Oct 4 00:43:30 2017 +0200| [0ca0ec26a62e7913ee725fa4cabf2deaa4e40bed] | committer: Marton Balint
ffmpeg: always init output stream before reaping filters
Otherwise the frame size of the codec is not set in the buffersink.
Fixes ticket #6603 and the following simpler case:
ffmpeg -c aac -filter_complex "sine=d=0.1,asetnsamples=1025" out.aac
Signed-off-by: Marton Balint <cus at passwd.hu>
(cherry picked from commit f4090940bd3024e69d236257d327f11d1e496229)
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=0ca0ec26a62e7913ee725fa4cabf2deaa4e40bed
---
fftools/ffmpeg.c | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/fftools/ffmpeg.c b/fftools/ffmpeg.c
index 3ee31473dc..d581b40bf2 100644
--- a/fftools/ffmpeg.c
+++ b/fftools/ffmpeg.c
@@ -4536,6 +4536,15 @@ static int transcode_step(void)
}
if (ost->filter && ost->filter->graph->graph) {
+ if (!ost->initialized) {
+ char error[1024] = {0};
+ ret = init_output_stream(ost, error, sizeof(error));
+ if (ret < 0) {
+ av_log(NULL, AV_LOG_ERROR, "Error initializing output stream %d:%d -- %s\n",
+ ost->file_index, ost->index, error);
+ exit_program(1);
+ }
+ }
if ((ret = transcode_from_filter(ost->filter->graph, &ist)) < 0)
return ret;
if (!ist)
More information about the ffmpeg-cvslog
mailing list