lavf/spdifdec: fix demuxing of AAC in IEC 61937
Return value of avpriv_aac_parse_header() is not checked correctly. Fix
it.
Signed-off-by: Anssi Hannula <anssi.hannula@iki.fi>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit f86387b6c2
)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:

committed by
Michael Niedermayer

parent
d8be5bda1b
commit
b56e9beeb8
@@ -57,7 +57,7 @@ static int spdif_get_offset_and_codec(AVFormatContext *s,
|
|||||||
break;
|
break;
|
||||||
case IEC61937_MPEG2_AAC:
|
case IEC61937_MPEG2_AAC:
|
||||||
init_get_bits(&gbc, buf, AAC_ADTS_HEADER_SIZE * 8);
|
init_get_bits(&gbc, buf, AAC_ADTS_HEADER_SIZE * 8);
|
||||||
if (avpriv_aac_parse_header(&gbc, &aac_hdr)) {
|
if (avpriv_aac_parse_header(&gbc, &aac_hdr) < 0) {
|
||||||
if (s) /* be silent during a probe */
|
if (s) /* be silent during a probe */
|
||||||
av_log(s, AV_LOG_ERROR, "Invalid AAC packet in IEC 61937\n");
|
av_log(s, AV_LOG_ERROR, "Invalid AAC packet in IEC 61937\n");
|
||||||
return AVERROR_INVALIDDATA;
|
return AVERROR_INVALIDDATA;
|
||||||
|
Reference in New Issue
Block a user