summaryrefslogtreecommitdiff
path: root/fftools
diff options
context:
space:
mode:
authorMarton Balint <cus@passwd.hu>2017-10-04 00:43:30 +0200
committerMarton Balint <cus@passwd.hu>2017-10-18 21:52:47 +0200
commitf4090940bd3024e69d236257d327f11d1e496229 (patch)
treec772c8bbb8fa92c8fbe49c362cb366b6d637d044 /fftools
parent89cc48551bbe9f147ba9f4ca3821a35797cf7b47 (diff)
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@passwd.hu>
Diffstat (limited to 'fftools')
-rw-r--r--fftools/ffmpeg.c9
1 files changed, 9 insertions, 0 deletions
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)