diff --git a/src/meta/mp4.c b/src/meta/mp4.c index b744f84c..8d4b0a80 100644 --- a/src/meta/mp4.c +++ b/src/meta/mp4.c @@ -91,18 +91,12 @@ VGMSTREAM * init_vgmstream_mp4_aac_offset(STREAMFILE *streamFile, uint64_t start aacDecoder_SetParam( aac_file->h_aacdecoder, AAC_PCM_OUTPUT_CHANNELS, 2 ); -<<<<<<< HEAD MP4GetTrackESConfiguration( aac_file->h_mp4file, aac_file->track_id, (uint8_t**)(&buffer), (uint32_t*)(&buffer_size)); ubuffer_size = buffer_size; if ( aacDecoder_ConfigRaw( aac_file->h_aacdecoder, &buffer, &ubuffer_size ) ) goto fail; free( buffer ); buffer = NULL; -======= - MP4GetTrackESConfiguration( aac_file->h_mp4file, aac_file->track_id, (uint8_t**)(&aac_file->codec_init_data), (uint32_t*)(&aac_file->codec_init_data_size)); - - if ( aacDecoder_ConfigRaw( aac_file->h_aacdecoder, &aac_file->codec_init_data, &aac_file->codec_init_data_size ) ) goto fail; ->>>>>>> Implemented MP4 AAC support for iOS AKB format aac_file->sampleId = 1; aac_file->numSamples = MP4GetTrackNumberOfSamples( aac_file->h_mp4file, aac_file->track_id ); @@ -151,7 +145,6 @@ fail: if ( aac_file ) { if ( aac_file->h_aacdecoder ) aacDecoder_Close( aac_file->h_aacdecoder ); if ( aac_file->h_mp4file ) MP4Close( aac_file->h_mp4file, 0 ); - if ( aac_file->codec_init_data ) free( aac_file->codec_init_data ); free( aac_file ); } return NULL; diff --git a/src/vgmstream.c b/src/vgmstream.c index 9d02af41..5af57e33 100644 --- a/src/vgmstream.c +++ b/src/vgmstream.c @@ -420,7 +420,7 @@ void reset_vgmstream(VGMSTREAM * vgmstream) { #endif if (vgmstream->coding_type==coding_MP4_AAC) { mp4_aac_codec_data *data = vgmstream->codec_data; - data->sampleId = 1; + data->sampleId = 0; data->sample_ptr = data->samples_per_frame; data->samples_discard = 0; } @@ -592,7 +592,6 @@ void close_vgmstream(VGMSTREAM * vgmstream) { if (data->h_aacdecoder) aacDecoder_Close(data->h_aacdecoder); if (data->h_mp4file) MP4Close(data->h_mp4file, 0); if (data->if_file.streamfile) close_streamfile(data->if_file.streamfile); - if (data->codec_init_data) free(data->codec_init_data); free(vgmstream->codec_data); vgmstream->codec_data = NULL; } @@ -1580,10 +1579,6 @@ int vgmstream_do_loop(VGMSTREAM * vgmstream) { data->sampleId = 0; data->sample_ptr = data->samples_per_frame; data->samples_discard = vgmstream->loop_sample; - aacDecoder_Close(data->h_aacdecoder); - data->h_aacdecoder = aacDecoder_Open( TT_MP4_RAW, 1 ); - aacDecoder_SetParam( data->h_aacdecoder, AAC_PCM_OUTPUT_CHANNELS, 2 ); - aacDecoder_ConfigRaw( data->h_aacdecoder, &data->codec_init_data, &data->codec_init_data_size ); } #ifdef VGM_USE_MPEG /* won't work for fake MPEG */ diff --git a/src/vgmstream.h b/src/vgmstream.h index 7f9caf46..e3303cd7 100644 --- a/src/vgmstream.h +++ b/src/vgmstream.h @@ -772,7 +772,6 @@ typedef struct { MP4FileHandle h_mp4file; MP4TrackId track_id; unsigned long sampleId, numSamples; - uint8_t * codec_init_data; UINT codec_init_data_size; HANDLE_AACDECODER h_aacdecoder; unsigned int sample_ptr, samples_per_frame, samples_discard;