git.videolan.org
/
ffmpeg.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge commit 'bbf6a4aa20bfe3d7869b2218e66063602dfb8aa7'
[ffmpeg.git]
/
libavcodec
/
atrac3.c
diff --git
a/libavcodec/atrac3.c
b/libavcodec/atrac3.c
index
0b56352
..
2a46a05
100644
(file)
--- a/
libavcodec/atrac3.c
+++ b/
libavcodec/atrac3.c
@@
-923,11
+923,6
@@
static av_cold int atrac3_decode_init(AVCodecContext *avctx)
return AVERROR(EINVAL);
}
return AVERROR(EINVAL);
}
- if (q->coding_mode == JOINT_STEREO && avctx->channels < 2) {
- av_log(avctx, AV_LOG_ERROR, "Invalid coding mode\n");
- return AVERROR_INVALIDDATA;
- }
-
/* Check the extradata */
if (version != 4) {
/* Check the extradata */
if (version != 4) {
@@
-950,9
+945,13
@@
static av_cold int atrac3_decode_init(AVCodecContext *avctx)
if (q->coding_mode == STEREO)
av_log(avctx, AV_LOG_DEBUG, "Normal stereo detected.\n");
if (q->coding_mode == STEREO)
av_log(avctx, AV_LOG_DEBUG, "Normal stereo detected.\n");
- else if (q->coding_mode == JOINT_STEREO)
+ else if (q->coding_mode == JOINT_STEREO) {
+ if (avctx->channels != 2) {
+ av_log(avctx, AV_LOG_ERROR, "Invalid coding mode\n");
+ return AVERROR_INVALIDDATA;
+ }
av_log(avctx, AV_LOG_DEBUG, "Joint stereo detected.\n");
av_log(avctx, AV_LOG_DEBUG, "Joint stereo detected.\n");
- else {
+
}
else {
av_log(avctx, AV_LOG_ERROR, "Unknown channel coding mode %x!\n",
q->coding_mode);
return AVERROR_INVALIDDATA;
av_log(avctx, AV_LOG_ERROR, "Unknown channel coding mode %x!\n",
q->coding_mode);
return AVERROR_INVALIDDATA;