From fc455eb3842de79f638a3982eb30e1728ac1f736 Mon Sep 17 00:00:00 2001 From: waker Date: Wed, 3 Jul 2013 20:36:06 +0200 Subject: added audio/x-mpeg content type; fixed streaming mp3 regression --- plugins/mpgmad/mpgmad.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'plugins/mpgmad') diff --git a/plugins/mpgmad/mpgmad.c b/plugins/mpgmad/mpgmad.c index dab3fd87..70087511 100644 --- a/plugins/mpgmad/mpgmad.c +++ b/plugins/mpgmad/mpgmad.c @@ -259,7 +259,7 @@ cmp3_scan_stream (buffer_t *buffer, int sample) { sync = fb[1]; if ((sync >> 5) != 7) { lastframe_valid = 0; - // trace ("[2]frame %d didn't seek to frame end\n", nframe); +// trace ("[2]frame %d didn't seek to frame end\n", nframe); continue; } } @@ -410,7 +410,7 @@ cmp3_scan_stream (buffer_t *buffer, int sample) { valid_frames++; // {{{ update stream parameters, only when sample!=0 or 1st frame -// trace ("have_info: %d, lastframe_valid=%d\n", have_info, lastframe_valid); + trace ("have_info: %d, lastframe_valid=%d\n", have_info, lastframe_valid); if (!have_info && lastframe_valid) { // don't get parameters from frames coming after any bad frame @@ -601,8 +601,8 @@ cmp3_scan_stream (buffer_t *buffer, int sample) { trace ("totalsamples: %d, samplesperframe: %d, fsize=%lld\n", buffer->totalsamples, samples_per_frame, fsize); // trace ("bitrate=%d, layer=%d, packetlength=%d, fsize=%d, nframes=%d, samples_per_frame=%d, samplerate=%d, duration=%f, totalsamples=%d\n", bitrate, layer, packetlength, sz, nframe, samples_per_frame, samplerate, buffer->duration, buffer->totalsamples); - if (sample == 0) { - deadbeef->fseek (buffer->file, framepos, SEEK_SET); + deadbeef->fseek (buffer->file, framepos, SEEK_SET); + if (sample == 0 && have_info) { trace ("scan finished\n"); return 0; } -- cgit v1.2.3