summaryrefslogtreecommitdiff
path: root/libavcodec
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2013-08-28 12:15:54 +0200
committerMichael Niedermayer <michaelni@gmx.at>2013-08-28 12:16:10 +0200
commitbfa1b42b3c8ff341dc50ee8c1b482fed554d947a (patch)
tree7ad6d1ff464c167571ce883a34245b5047cc6678 /libavcodec
parentf0ee0341b069818d466bc03709c48e6cc6bef9c5 (diff)
parent818d1f1a3e89d35213af0bd5dc4a772713951882 (diff)
Merge commit '818d1f1a3e89d35213af0bd5dc4a772713951882'
* commit '818d1f1a3e89d35213af0bd5dc4a772713951882': ac3: Clean up the error paths Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/ac3dec.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/libavcodec/ac3dec.c b/libavcodec/ac3dec.c
index fc15a41c74..5607fd6e53 100644
--- a/libavcodec/ac3dec.c
+++ b/libavcodec/ac3dec.c
@@ -1305,7 +1305,7 @@ static int ac3_decode_frame(AVCodecContext * avctx, void *data,
/* skip frame if CRC is ok. otherwise use error concealment. */
/* TODO: add support for substreams and dependent frames */
if (s->frame_type == EAC3_FRAME_TYPE_DEPENDENT || s->substreamid) {
- av_log(avctx, AV_LOG_ERROR, "unsupported frame type : "
+ av_log(avctx, AV_LOG_WARNING, "unsupported frame type : "
"skipping frame\n");
*got_frame_ptr = 0;
return buf_size;
@@ -1313,9 +1313,12 @@ static int ac3_decode_frame(AVCodecContext * avctx, void *data,
av_log(avctx, AV_LOG_ERROR, "invalid frame type\n");
}
break;
- default:
- av_log(avctx, AV_LOG_ERROR, "invalid header\n");
+ case AAC_AC3_PARSE_ERROR_CRC:
+ case AAC_AC3_PARSE_ERROR_CHANNEL_CFG:
break;
+ default: // Normal AVERROR do not try to recover.
+ *got_frame_ptr = 0;
+ return err;
}
} else {
/* check that reported frame size fits in input buffer */