1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-11-26 19:01:44 +02:00

avcodec/dcadec: print more details about errors

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer 2013-11-29 03:42:03 +01:00
parent 43ec456320
commit 12235a3ed2

View File

@ -1450,8 +1450,10 @@ static int dca_subframe_footer(DCAContext *s, int base_channel)
aux_data_end = 8 * aux_data_count + get_bits_count(&s->gb);
if (get_bits_long(&s->gb, 32) != 0x9A1105A0) // nSYNCAUX
if (get_bits_long(&s->gb, 32) != 0x9A1105A0) { // nSYNCAUX
av_log(s->avctx,AV_LOG_ERROR, "nSYNCAUX mismatching\n");
return AVERROR_INVALIDDATA;
}
if (get_bits1(&s->gb)) { // bAUXTimeStampFlag
avpriv_request_sample(s->avctx,
@ -1502,9 +1504,10 @@ static int dca_subframe_footer(DCAContext *s, int base_channel)
skip_bits(&s->gb, 16); // nAUXCRC16
// additional data (reserved, cf. ETSI TS 102 114 V1.4.1)
if ((reserved = (aux_data_end - get_bits_count(&s->gb))) < 0)
if ((reserved = (aux_data_end - get_bits_count(&s->gb))) < 0) {
av_log(s->avctx, AV_LOG_ERROR, "overread aux by %d bits\n", -reserved);
return AVERROR_INVALIDDATA;
else if (reserved) {
} else if (reserved) {
avpriv_request_sample(s->avctx,
"Core auxiliary data reserved content");
skip_bits_long(&s->gb, reserved);