[FFmpeg-cvslog] ffmpeg: fix -map_channel being ignored when resampling is not needed.

Clément Bœsch git at videolan.org
Tue Jan 31 17:45:03 CET 2012


ffmpeg | branch: master | Clément Bœsch <clement.boesch at smartjog.com> | Tue Jan 31 15:51:01 2012 +0100| [c6736713330807b3971d52ba33df5ef3fa8e2e74] | committer: Clément Bœsch

ffmpeg: fix -map_channel being ignored when resampling is not needed.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=c6736713330807b3971d52ba33df5ef3fa8e2e74
---

 ffmpeg.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/ffmpeg.c b/ffmpeg.c
index 3c29f32..a794dd3 100644
--- a/ffmpeg.c
+++ b/ffmpeg.c
@@ -1245,7 +1245,7 @@ need_realloc:
         ost->sync_opts = lrintf(get_sync_ipts(ost) * enc->sample_rate) -
                                 av_fifo_size(ost->fifo) / (enc->channels * osize); // FIXME wrong
 
-    if (ost->audio_resample) {
+    if (ost->audio_resample || ost->audio_channels_mapped) {
         buftmp = audio_buf;
         size_out = swr_convert(ost->swr, (      uint8_t*[]){buftmp}, audio_buf_size / (enc->channels * osize),
                                          (const uint8_t*[]){buf   }, size / (dec->channels * isize));



More information about the ffmpeg-cvslog mailing list