From: Wolfjourn Date: Tue, 09 Oct 2007 23:49:46 -0700 Subject: demux_mpgaudio gives up too easily while searching preview. (SF bug 1810614) When sniff_buffer_looks_like_mp3() finds a valid frame in the preview, it looks directly ahead for another valid frame. If the next frame isn't valid, it fails out instead of continuing to search the rest of the preview. This results in the demuxer failing to correctly detect streams it can handle if it manages to find garbage bytes that look like a valid frame before it reaches legitimately valid frames in the stream. This patch makes the search more exhaustive by continuing the search if the neighbouring frame wasn't found. diff -ur xine-lib-1.1.8/src/demuxers/demux_mpgaudio.c xine-lib-1.1.8-new/src/demuxers/demux_mpgaudio.c --- xine-lib-1.1.8/src/demuxers/demux_mpgaudio.c 2007-08-18 19:36:45.000000000 -0400 +++ xine-lib-1.1.8-new/src/demuxers/demux_mpgaudio.c 2007-10-10 02:19:36.000000000 -0400 @@ -551,7 +551,7 @@ lprintf("mpeg audio frame detected\n"); return 1; } - break; + /* Continue searching if we didn't find the neighbouring frame. */ } } return 0;