aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec
diff options
context:
space:
mode:
authorLuca Barbato <lu_zero@gentoo.org>2013-07-28 13:32:18 +0200
committerSean McGovern <gseanmcg@gmail.com>2013-09-23 19:45:22 -0400
commit37e69e2dee7c5167083bb42d669f73f038111a79 (patch)
treea90043d3fbb376cf7b9dac3416138322e87527f0 /libavcodec
parent3dff283de11ad52ddae3246fe7594526ebb62d04 (diff)
downloadffmpeg-37e69e2dee7c5167083bb42d669f73f038111a79.tar.gz
ac3: Clean up the error paths
(cherry picked from commit 818d1f1a3e89d35213af0bd5dc4a772713951882) Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
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 2eac0ed12a..86726c311f 100644
--- a/libavcodec/ac3dec.c
+++ b/libavcodec/ac3dec.c
@@ -1342,7 +1342,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;
@@ -1350,9 +1350,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 */