summaryrefslogtreecommitdiff
path: root/libavcodec/ws-snd1.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2012-11-02 14:40:04 +0100
committerMichael Niedermayer <michaelni@gmx.at>2012-11-02 14:57:36 +0100
commit8551c6bec0fd6cf719f94b24bca39b1c3318e213 (patch)
tree9ba0df8011bead24b8a66dd0b0c2e6e544a7edf3 /libavcodec/ws-snd1.c
parent6788350281c418f0f395a8279eee82f7abe7c63b (diff)
parente1c804d883f3cca1b492147a2ac5d0aea7460076 (diff)
downloadffmpeg-8551c6bec0fd6cf719f94b24bca39b1c3318e213.tar.gz
Merge remote-tracking branch 'qatar/master'
* qatar/master: dv1394: Swap the min and max values of the 'standard' option rtpdec_vp8: Don't parse fields that aren't used lavc: add some AVPacket doxy. audiointerleave: deobfuscate a function call. rtpdec: factorize identical code used in several handlers a64: remove interleaved mode. doc: Point to the new location of the c99-to-c89 tool decode_audio3: initialize AVFrame ws-snd1: set channel layout wmavoice: set channel layout wmapro: use AVCodecContext.channels instead of keeping a private copy wma: do not keep private copies of some AVCodecContext fields Conflicts: libavcodec/wmadec.c libavcodec/wmaenc.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/ws-snd1.c')
-rw-r--r--libavcodec/ws-snd1.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/libavcodec/ws-snd1.c b/libavcodec/ws-snd1.c
index dfa02b6954..3a83f94e41 100644
--- a/libavcodec/ws-snd1.c
+++ b/libavcodec/ws-snd1.c
@@ -20,6 +20,8 @@
*/
#include <stdint.h>
+
+#include "libavutil/audioconvert.h"
#include "libavutil/common.h"
#include "libavutil/intreadwrite.h"
#include "avcodec.h"
@@ -46,12 +48,9 @@ static av_cold int ws_snd_decode_init(AVCodecContext *avctx)
{
WSSndContext *s = avctx->priv_data;
- if (avctx->channels != 1) {
- av_log_ask_for_sample(avctx, "unsupported number of channels\n");
- return AVERROR(EINVAL);
- }
-
- avctx->sample_fmt = AV_SAMPLE_FMT_U8;
+ avctx->channels = 1;
+ avctx->channel_layout = AV_CH_LAYOUT_MONO;
+ avctx->sample_fmt = AV_SAMPLE_FMT_U8;
avcodec_get_frame_defaults(&s->frame);
avctx->coded_frame = &s->frame;