diff options
author | James Almer <jamrial@gmail.com> | 2022-10-22 16:30:52 -0300 |
---|---|---|
committer | James Almer <jamrial@gmail.com> | 2022-10-26 10:18:33 -0300 |
commit | b5abf6fdfc0d1bd8b009f8877589f1bc7eec3e9c (patch) | |
tree | f0ca3804115abb379c3ebe27f093d567f38f24d3 /libavcodec/ac3_parser.c | |
parent | 676e7d7f9b5dc76d5124cc99e3a3fa6c823decc3 (diff) |
avcodec/aac_ac3_parser: don't fill stream info in the sync function
Have it only find frame boundaries. The stream props will then be filled once
we have an assembled frame.
Signed-off-by: James Almer <jamrial@gmail.com>
Diffstat (limited to 'libavcodec/ac3_parser.c')
-rw-r--r-- | libavcodec/ac3_parser.c | 16 |
1 files changed, 1 insertions, 15 deletions
diff --git a/libavcodec/ac3_parser.c b/libavcodec/ac3_parser.c index 425e1b4742..8885e1c72e 100644 --- a/libavcodec/ac3_parser.c +++ b/libavcodec/ac3_parser.c @@ -215,8 +215,7 @@ int av_ac3_parse_header(const uint8_t *buf, size_t size, return 0; } -static int ac3_sync(uint64_t state, AACAC3ParseContext *hdr_info, - int *need_next_header, int *new_frame_start) +static int ac3_sync(uint64_t state, int *need_next_header, int *new_frame_start) { int err; union { @@ -238,19 +237,6 @@ static int ac3_sync(uint64_t state, AACAC3ParseContext *hdr_info, if(err < 0) return 0; - hdr_info->sample_rate = hdr.sample_rate; - hdr_info->bit_rate = hdr.bit_rate; - hdr_info->channels = hdr.channels; - hdr_info->channel_layout = hdr.channel_layout; - hdr_info->samples = hdr.num_blocks * 256; - hdr_info->service_type = hdr.bitstream_mode; - if (hdr.bitstream_mode == 0x7 && hdr.channels > 1) - hdr_info->service_type = AV_AUDIO_SERVICE_TYPE_KARAOKE; - if(hdr.bitstream_id>10) - hdr_info->codec_id = AV_CODEC_ID_EAC3; - else if (hdr_info->codec_id == AV_CODEC_ID_NONE) - hdr_info->codec_id = AV_CODEC_ID_AC3; - *new_frame_start = (hdr.frame_type != EAC3_FRAME_TYPE_DEPENDENT); *need_next_header = *new_frame_start || (hdr.frame_type != EAC3_FRAME_TYPE_AC3_CONVERT); return hdr.frame_size; |