Commit bfa1b42b authored by Michael Niedermayer's avatar Michael Niedermayer

Merge commit '818d1f1a'

* commit '818d1f1a':
  ac3: Clean up the error paths
Merged-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parents f0ee0341 818d1f1a
...@@ -1305,7 +1305,7 @@ static int ac3_decode_frame(AVCodecContext * avctx, void *data, ...@@ -1305,7 +1305,7 @@ static int ac3_decode_frame(AVCodecContext * avctx, void *data,
/* skip frame if CRC is ok. otherwise use error concealment. */ /* skip frame if CRC is ok. otherwise use error concealment. */
/* TODO: add support for substreams and dependent frames */ /* TODO: add support for substreams and dependent frames */
if (s->frame_type == EAC3_FRAME_TYPE_DEPENDENT || s->substreamid) { 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"); "skipping frame\n");
*got_frame_ptr = 0; *got_frame_ptr = 0;
return buf_size; return buf_size;
...@@ -1313,9 +1313,12 @@ static int ac3_decode_frame(AVCodecContext * avctx, void *data, ...@@ -1313,9 +1313,12 @@ static int ac3_decode_frame(AVCodecContext * avctx, void *data,
av_log(avctx, AV_LOG_ERROR, "invalid frame type\n"); av_log(avctx, AV_LOG_ERROR, "invalid frame type\n");
} }
break; break;
default: case AAC_AC3_PARSE_ERROR_CRC:
av_log(avctx, AV_LOG_ERROR, "invalid header\n"); case AAC_AC3_PARSE_ERROR_CHANNEL_CFG:
break; break;
default: // Normal AVERROR do not try to recover.
*got_frame_ptr = 0;
return err;
} }
} else { } else {
/* check that reported frame size fits in input buffer */ /* check that reported frame size fits in input buffer */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment