No longer extracting the frame size from the mode to build the header
This commit is contained in:
parent
00a98f5deb
commit
b35807d75a
3 changed files with 4 additions and 4 deletions
|
@ -57,7 +57,7 @@ typedef struct {
|
|||
} CELTHeader;
|
||||
|
||||
/** Creates a basic header struct */
|
||||
EXPORT int celt_header_init(CELTHeader *header, const CELTMode *m, int channels);
|
||||
EXPORT int celt_header_init(CELTHeader *header, const CELTMode *m, int frame_size, int channels);
|
||||
|
||||
EXPORT int celt_header_to_packet(const CELTHeader *header, unsigned char *packet, celt_uint32 size);
|
||||
|
||||
|
|
|
@ -51,7 +51,7 @@ _le_32 (celt_uint32 i)
|
|||
return ret;
|
||||
}
|
||||
|
||||
int celt_header_init(CELTHeader *header, const CELTMode *m, int channels)
|
||||
int celt_header_init(CELTHeader *header, const CELTMode *m, int frame_size, int channels)
|
||||
{
|
||||
if (header==NULL)
|
||||
return CELT_BAD_ARG;
|
||||
|
@ -64,7 +64,7 @@ int celt_header_init(CELTHeader *header, const CELTMode *m, int channels)
|
|||
header->sample_rate = m->Fs;
|
||||
header->nb_channels = channels;
|
||||
/*FIXME: This won't work for variable frame size */
|
||||
header->frame_size = m->shortMdctSize*m->nbShortMdcts;
|
||||
header->frame_size = frame_size;
|
||||
header->overlap = m->overlap;
|
||||
header->bytes_per_packet = -1;
|
||||
header->extra_headers = 0;
|
||||
|
|
|
@ -508,7 +508,7 @@ int main(int argc, char **argv)
|
|||
|
||||
/*celt_mode_info(mode, CELT_GET_FRAME_SIZE, &frame_size);*/
|
||||
|
||||
celt_header_init(&header, mode, chan);
|
||||
celt_header_init(&header, mode, frame_size, chan);
|
||||
header.nb_channels = chan;
|
||||
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue