summaryrefslogtreecommitdiff
path: root/libavcodec/pcm.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2012-11-20 13:34:27 +0100
committerMichael Niedermayer <michaelni@gmx.at>2012-11-20 13:34:27 +0100
commit70c0f13a9a40323456d8810a7a1ee0a6256c3384 (patch)
tree342bb51679733769271a1c441d98cb9d504d225e /libavcodec/pcm.c
parentda8242e2d6f85d95239082efd0e5e2345e685a2c (diff)
parent7c278d2ae410a64bdd89f1777026b4b963c30a1a (diff)
Merge commit '7c278d2ae410a64bdd89f1777026b4b963c30a1a'
* commit '7c278d2ae410a64bdd89f1777026b4b963c30a1a': alacenc: support 24-bit encoding pcmdec: use planar sample format for pcm_s16le_planar vorbisdec: use float planar sample format Conflicts: libavcodec/pcm.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/pcm.c')
-rw-r--r--libavcodec/pcm.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/libavcodec/pcm.c b/libavcodec/pcm.c
index 36385f7e99..b0daf21122 100644
--- a/libavcodec/pcm.c
+++ b/libavcodec/pcm.c
@@ -358,7 +358,16 @@ static int pcm_decode_frame(AVCodecContext *avctx, void *data,
DECODE_PLANAR(16, be16, src, samples, n, 0, 0);
break;
case AV_CODEC_ID_PCM_S16LE_PLANAR:
- DECODE_PLANAR(16, le16, src, samples, n, 0, 0);
+ n /= avctx->channels;
+ for (c = 0; c < avctx->channels; c++) {
+ samples = s->frame.extended_data[c];
+#if HAVE_BIGENDIAN
+ DECODE(16, le16, src, samples, n, 0, 0)
+#else
+ memcpy(samples, src, n * 2);
+#endif
+ src += n * 2;
+ }
break;
case AV_CODEC_ID_PCM_S24LE_PLANAR:
DECODE_PLANAR(32, le24, src, samples, n, 8, 0);