X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavcodec%2Faac_ac3_parser.c;h=54e459844f141c8c176ac64a2be4b360a4c4f56b;hb=8e30502abe62f741cfef1e7b75048ae86a99a50f;hp=4e834b4424e78666f7176e3890653c178d0608a3;hpb=6c59f05c74d87b169bd9775e6a399ed298742137;p=ffmpeg diff --git a/libavcodec/aac_ac3_parser.c b/libavcodec/aac_ac3_parser.c index 4e834b4424e..54e459844f1 100644 --- a/libavcodec/aac_ac3_parser.c +++ b/libavcodec/aac_ac3_parser.c @@ -60,6 +60,9 @@ get_next: s->remaining_size += i; goto get_next; } + else if (i < 0) { + s->remaining_size += i; + } } } } @@ -86,13 +89,16 @@ get_next: the frame). */ if (avctx->codec_id != AV_CODEC_ID_AAC) { avctx->sample_rate = s->sample_rate; - avctx->channels = s->channels; - avctx->channel_layout = s->channel_layout; + if (avctx->codec_id != AV_CODEC_ID_EAC3) { + avctx->channels = s->channels; + avctx->channel_layout = s->channel_layout; + } s1->duration = s->samples; avctx->audio_service_type = s->service_type; } - avctx->bit_rate = s->bit_rate; + if (avctx->codec_id != AV_CODEC_ID_EAC3) + avctx->bit_rate = s->bit_rate; } return i;