diff options
author | Justin Ruggles <justin.ruggles@gmail.com> | 2011-10-27 11:45:50 -0400 |
---|---|---|
committer | Justin Ruggles <justin.ruggles@gmail.com> | 2011-10-29 16:04:07 -0400 |
commit | 272fcc32bb0d3b552390d15213201756fdf27d74 (patch) | |
tree | b5c7479eb0cfff644b483e972ae77a60a4159e79 /libavcodec/dca.c | |
parent | aae6eead6a6e9bbab1c808d7552da5631ac78576 (diff) | |
download | ffmpeg-272fcc32bb0d3b552390d15213201756fdf27d74.tar.gz |
dca: handle errors from dca_decode_block()
Return error if core block decoding fails.
Do not enable XCh if XCh extension block decoding fails.
Diffstat (limited to 'libavcodec/dca.c')
-rw-r--r-- | libavcodec/dca.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/libavcodec/dca.c b/libavcodec/dca.c index deb7245256..7f7bcf9cfd 100644 --- a/libavcodec/dca.c +++ b/libavcodec/dca.c @@ -1668,7 +1668,10 @@ static int dca_decode_frame(AVCodecContext * avctx, s->profile = FF_PROFILE_DTS; for (i = 0; i < (s->sample_blocks / 8); i++) { - dca_decode_block(s, 0, i); + if ((ret = dca_decode_block(s, 0, i))) { + av_log(avctx, AV_LOG_ERROR, "error decoding block\n"); + return ret; + } } /* record number of core channels incase less than max channels are requested */ @@ -1724,7 +1727,10 @@ static int dca_decode_frame(AVCodecContext * avctx, dca_parse_audio_coding_header(s, s->xch_base_channel); for (i = 0; i < (s->sample_blocks / 8); i++) { - dca_decode_block(s, s->xch_base_channel, i); + if ((ret = dca_decode_block(s, s->xch_base_channel, i))) { + av_log(avctx, AV_LOG_ERROR, "error decoding XCh extension\n"); + continue; + } } s->xch_present = 1; |