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>
This commit is contained in:
James Almer
2022-10-22 16:30:52 -03:00
parent 676e7d7f9b
commit b5abf6fdfc
4 changed files with 53 additions and 45 deletions

View File

@@ -27,8 +27,7 @@
#include "get_bits.h"
#include "mpeg4audio.h"
static int aac_sync(uint64_t state, AACAC3ParseContext *hdr_info,
int *need_next_header, int *new_frame_start)
static int aac_sync(uint64_t state, int *need_next_header, int *new_frame_start)
{
GetBitContext bits;
AACADTSHeaderInfo hdr;
@@ -46,10 +45,6 @@ static int aac_sync(uint64_t state, AACAC3ParseContext *hdr_info,
return 0;
*need_next_header = 0;
*new_frame_start = 1;
hdr_info->sample_rate = hdr.sample_rate;
hdr_info->channels = ff_mpeg4audio_channels[hdr.chan_config];
hdr_info->samples = hdr.samples;
hdr_info->bit_rate = hdr.bit_rate;
return size;
}