summaryrefslogtreecommitdiff
path: root/src/lib/ffmpeg_decoder.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2012-11-07 14:02:24 +0000
committerCarl Hetherington <cth@carlh.net>2012-11-07 14:02:24 +0000
commit5ff6c5b412fcd63c1a4dad88d1535fb56e457b8e (patch)
tree3e55cee87186a268fb9dfd98f4ff2b288966ea7c /src/lib/ffmpeg_decoder.cc
parentf89ef49deefe91e2b1972b54ee07bfc22a22f303 (diff)
FFmpeg decoder should only do audio if we're using source audio.
Diffstat (limited to 'src/lib/ffmpeg_decoder.cc')
-rw-r--r--src/lib/ffmpeg_decoder.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lib/ffmpeg_decoder.cc b/src/lib/ffmpeg_decoder.cc
index e765d296a..e26de4ada 100644
--- a/src/lib/ffmpeg_decoder.cc
+++ b/src/lib/ffmpeg_decoder.cc
@@ -243,7 +243,7 @@ FFmpegDecoder::pass ()
process_video (_frame);
}
- if (_audio_stream >= 0 && _opt->decode_audio) {
+ if (_audio_stream >= 0 && _opt->decode_audio && _film->use_source_audio()) {
while (avcodec_decode_audio4 (_audio_codec_context, _frame, &frame_finished, &_packet) >= 0 && frame_finished) {
int const data_size = av_samples_get_buffer_size (
0, _audio_codec_context->channels, _frame->nb_samples, audio_sample_format (), 1
@@ -307,7 +307,7 @@ FFmpegDecoder::pass ()
}
}
- } else if (_audio_stream >= 0 && _packet.stream_index == _audio_stream && _opt->decode_audio) {
+ } else if (_audio_stream >= 0 && _packet.stream_index == _audio_stream && _opt->decode_audio && _film->use_source_audio()) {
int frame_finished;
if (avcodec_decode_audio4 (_audio_codec_context, _frame, &frame_finished, &_packet) >= 0 && frame_finished) {