From 1f273253942ed4f8513f218a05e7b4aa8b87c20e Mon Sep 17 00:00:00 2001 From: David Lamparter Date: Fri, 14 Apr 2006 23:14:47 +0000 Subject: [PATCH] omg. stupidest bug ever. initialize bytes_per_sample Originally committed to SVN as r336. --- core/audio_provider_lavc.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/audio_provider_lavc.cpp b/core/audio_provider_lavc.cpp index 0ab46fab8..cad538371 100644 --- a/core/audio_provider_lavc.cpp +++ b/core/audio_provider_lavc.cpp @@ -81,6 +81,7 @@ LAVCAudioProvider::LAVCAudioProvider(wxString _filename, VideoProvider *vpro) int setsample = Options.AsInt(_T("Audio Sample Rate")); num_samples = stream->duration / bytes_per_sample; + bytes_per_sample = 2; if (setsample) { rsct = audio_resample_init(1, codecContext->channels, setsample, codecContext->sample_rate); sample_rate = setsample; @@ -91,7 +92,6 @@ LAVCAudioProvider::LAVCAudioProvider(wxString _filename, VideoProvider *vpro) sample_rate = codecContext->sample_rate; channels = codecContext->channels; } - bytes_per_sample = 2; buffer = (int16_t *)malloc(AVCODEC_MAX_AUDIO_FRAME_SIZE); if (!buffer)