Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2011-11-12 05:50:25 +0400
committerMichael Niedermayer <michaelni@gmx.at>2011-11-12 05:50:25 +0400
commit29582df797745fa6c5eec22b007e4fd3a47e7dd9 (patch)
tree59c487e218e4f750b48151d548db9091236d096f /libavcodec/mpc7.c
parent6761b6b825c4aafff311a180a09c7013288480aa (diff)
parent29ae0565d98bb41e54fc74f74c330d3214825f47 (diff)
Merge remote-tracking branch 'qatar/master'
* qatar/master: vble: remove vble_error_close VBLE Decoder tta: use an integer instead of a pointer to iterate output samples shorten: do not modify samples pointer when interleaving mpc7: only support stereo input. dpcm: do not try to decode empty packets dpcm: remove unneeded buf_size==0 check. twinvq: add SSE/AVX optimized sum/difference stereo interleaving vqf/twinvq: pass vqf COMM chunk info in extradata vqf: do not set bits_per_coded_sample for TwinVQ. twinvq: check for allocation failure in init_mdct_win() swscale: add padding to conversion buffer. rtpdec: Simplify finalize_packet http: Handle proxy authentication http: Print an error message for Authorization Required, too AVOptions: don't return an invalid option when option list is empty AIFF: add 'twos' FourCC for the mux/demuxer (big endian PCM audio) Conflicts: libavcodec/avcodec.h libavcodec/tta.c libavcodec/vble.c libavcodec/version.h libavutil/opt.c libswscale/utils.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/mpc7.c')
-rw-r--r--libavcodec/mpc7.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/libavcodec/mpc7.c b/libavcodec/mpc7.c
index 3418b7b4f8..1e76ddf56a 100644
--- a/libavcodec/mpc7.c
+++ b/libavcodec/mpc7.c
@@ -61,6 +61,13 @@ static av_cold int mpc7_decode_init(AVCodecContext * avctx)
static VLC_TYPE hdr_table[1 << MPC7_HDR_BITS][2];
static VLC_TYPE quant_tables[7224][2];
+ /* Musepack SV7 is always stereo */
+ if (avctx->channels != 2) {
+ av_log_ask_for_sample(avctx, "Unsupported number of channels: %d\n",
+ avctx->channels);
+ return AVERROR_PATCHWELCOME;
+ }
+
if(avctx->extradata_size < 16){
av_log(avctx, AV_LOG_ERROR, "Too small extradata size (%i)!\n", avctx->extradata_size);
return -1;
@@ -88,7 +95,7 @@ static av_cold int mpc7_decode_init(AVCodecContext * avctx)
c->frames_to_skip = 0;
avctx->sample_fmt = AV_SAMPLE_FMT_S16;
- avctx->channel_layout = (avctx->channels==2) ? AV_CH_LAYOUT_STEREO : AV_CH_LAYOUT_MONO;
+ avctx->channel_layout = AV_CH_LAYOUT_STEREO;
if(vlc_initialized) return 0;
av_log(avctx, AV_LOG_DEBUG, "Initing VLC\n");