From ca8e634819900a725661a86299b15d7ae4096dd7 Mon Sep 17 00:00:00 2001 From: bnnm Date: Sun, 3 Oct 2021 13:49:02 +0200 Subject: [PATCH] ffmpeg: tweaks --- src/coding/ffmpeg_decoder.c | 2 +- src/coding/ffmpeg_decoder_custom_opus.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/coding/ffmpeg_decoder.c b/src/coding/ffmpeg_decoder.c index e363f5af..fa971d2c 100644 --- a/src/coding/ffmpeg_decoder.c +++ b/src/coding/ffmpeg_decoder.c @@ -404,9 +404,9 @@ ffmpeg_codec_data* init_ffmpeg_header_offset_subsong(STREAMFILE* sf, uint8_t* he VGM_ASSERT(stream->codecpar->trailing_padding > 0, "FFMPEG: trailing_padding %i\n", (int)stream->codecpar->trailing_padding); VGM_ASSERT(stream->codecpar->seek_preroll > 0, "FFMPEG: seek_preroll %i\n", (int)stream->codecpar->seek_preroll);//seek delay: OPUS VGM_ASSERT(stream->start_time > 0, "FFMPEG: start_time %i\n", (int)stream->start_time); //delay +#if 0 //LIBAVFORMAT_VERSION_INT < AV_VERSION_INT(58, 64, 100) VGM_ASSERT(stream->first_discard_sample > 0, "FFMPEG: first_discard_sample %i\n", (int)stream->first_discard_sample); //padding: MP3 VGM_ASSERT(stream->last_discard_sample > 0, "FFMPEG: last_discard_sample %i\n", (int)stream->last_discard_sample); //padding: MP3 -#if LIBAVFORMAT_VERSION_INT < AV_VERSION_INT(58, 64, 100) VGM_ASSERT(stream->skip_samples > 0, "FFMPEG: skip_samples %i\n", (int)stream->skip_samples); //delay: MP4 VGM_ASSERT(stream->start_skip_samples > 0, "FFMPEG: start_skip_samples %i\n", (int)stream->start_skip_samples); //delay: MP3 #endif diff --git a/src/coding/ffmpeg_decoder_custom_opus.c b/src/coding/ffmpeg_decoder_custom_opus.c index 80f676e1..cb69586e 100644 --- a/src/coding/ffmpeg_decoder_custom_opus.c +++ b/src/coding/ffmpeg_decoder_custom_opus.c @@ -349,7 +349,7 @@ static STREAMFILE* setup_opus_streamfile(STREAMFILE* sf, opus_config* cfg, off_t /* setup subfile */ new_sf = open_wrap_streamfile(sf); new_sf = open_io_streamfile_ex_f(new_sf, &io_data, sizeof(opus_io_data), opus_io_read, opus_io_size, opus_io_init, opus_io_close); - new_sf = open_buffer_streamfile_f(new_sf, 0); + //new_sf = open_buffer_streamfile_f(new_sf, 0); /* seems slightly slower on typical files */ return new_sf; fail: return NULL;