diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2014-09-11 04:55:58 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2014-10-03 03:40:59 +0200 |
commit | 9c57328b8192982b0c394ff5fd45a0b6863efbfd (patch) | |
tree | 2c6e055c9412c4f58a553c97319c200e3c99812a /ffmpeg_filter.c | |
parent | 6952f6f39b5ed1b93bf879a8517c87702406ed49 (diff) | |
download | ffmpeg-9c57328b8192982b0c394ff5fd45a0b6863efbfd.tar.gz |
ffmpeg: Do av_buffersink_set_frame_size() when reconfiguring the filtergraph not just when changing audio resample parameters
Fixes Ticket3562
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 16de4d927e8bd1308694217af6027265700b3694)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'ffmpeg_filter.c')
-rw-r--r-- | ffmpeg_filter.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/ffmpeg_filter.c b/ffmpeg_filter.c index 50ee422c6c..7b75e6fe5e 100644 --- a/ffmpeg_filter.c +++ b/ffmpeg_filter.c @@ -919,6 +919,16 @@ int configure_filtergraph(FilterGraph *fg) } fg->reconfiguration = 1; + + for (i = 0; i < fg->nb_outputs; i++) { + OutputStream *ost = fg->outputs[i]->ost; + if (ost && + ost->enc->type == AVMEDIA_TYPE_AUDIO && + !(ost->enc->capabilities & CODEC_CAP_VARIABLE_FRAME_SIZE)) + av_buffersink_set_frame_size(ost->filter->filter, + ost->enc_ctx->frame_size); + } + return 0; } |