aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authortrialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38>2013-01-10 14:40:54 +0000
committertrialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38>2013-01-10 14:40:54 +0000
commit9cbe3e1bd9bd2068b99402b9b935e1450c7c79d4 (patch)
treee28cdce76af9ebb71476ed25bff336e55e89205c /src
parent2da70a6c2c4c75383eae06bc617dc2d6c73e3aac (diff)
downloadqmmp-9cbe3e1bd9bd2068b99402b9b935e1450c7c79d4.tar.gz
qmmp-9cbe3e1bd9bd2068b99402b9b935e1450c7c79d4.tar.bz2
qmmp-9cbe3e1bd9bd2068b99402b9b935e1450c7c79d4.zip
ffmpeg plugin: fixed regression
git-svn-id: http://svn.code.sf.net/p/qmmp-dev/code/trunk/qmmp@3142 90c681e8-e032-0410-971d-27865f9a5e38
Diffstat (limited to 'src')
-rw-r--r--src/plugins/Input/ffmpeg/decoder_ffmpeg.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/plugins/Input/ffmpeg/decoder_ffmpeg.cpp b/src/plugins/Input/ffmpeg/decoder_ffmpeg.cpp
index d751f5845..9fd9146c4 100644
--- a/src/plugins/Input/ffmpeg/decoder_ffmpeg.cpp
+++ b/src/plugins/Input/ffmpeg/decoder_ffmpeg.cpp
@@ -281,10 +281,9 @@ qint64 DecoderFFmpeg::read(char *audio, qint64 maxSize)
return 0;
qint64 len = qMin(m_output_at, maxSize);
- if(av_sample_fmt_is_planar(c->sample_fmt))
+ if(av_sample_fmt_is_planar(c->sample_fmt) && c->request_channels > 1)
{
int bps = av_get_bytes_per_sample(c->sample_fmt);
-
for(int i = 0; i < len >> 1; i+=bps)
{
memcpy(audio + 2*i, m_decoded_frame->extended_data[0] + i, bps);