avcodec/aac_adtstoasc_bsf: validate and forward extradata if the stream is already ASC
Fixes ticket #5973
Reviewed-by: Hendrik Leppkes <h.leppkes@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
(cherry picked from commit 6e1902bab4
)
This commit is contained in:
@@ -2,6 +2,7 @@ Entries are sorted chronologically from oldest to youngest within each release,
|
|||||||
releases are sorted from youngest to oldest.
|
releases are sorted from youngest to oldest.
|
||||||
|
|
||||||
version 3.2.1:
|
version 3.2.1:
|
||||||
|
- avcodec/aac_adtstoasc_bsf: validate and forward extradata if the stream is already ASC
|
||||||
- mss2: only use error correction for matching block counts
|
- mss2: only use error correction for matching block counts
|
||||||
- softfloat: decrease MIN_EXP to cover full float range
|
- softfloat: decrease MIN_EXP to cover full float range
|
||||||
- libopusdec: default to stereo for invalid number of channels
|
- libopusdec: default to stereo for invalid number of channels
|
||||||
|
@@ -136,8 +136,16 @@ fail:
|
|||||||
|
|
||||||
static int aac_adtstoasc_init(AVBSFContext *ctx)
|
static int aac_adtstoasc_init(AVBSFContext *ctx)
|
||||||
{
|
{
|
||||||
av_freep(&ctx->par_out->extradata);
|
/* Validate the extradata if the stream is already MPEG-4 AudioSpecificConfig */
|
||||||
ctx->par_out->extradata_size = 0;
|
if (ctx->par_in->extradata) {
|
||||||
|
MPEG4AudioConfig mp4ac;
|
||||||
|
int ret = avpriv_mpeg4audio_get_config(&mp4ac, ctx->par_in->extradata,
|
||||||
|
ctx->par_in->extradata_size * 8, 1);
|
||||||
|
if (ret < 0) {
|
||||||
|
av_log(ctx, AV_LOG_ERROR, "Error parsing AudioSpecificConfig extradata!\n");
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user