GNOME Bugzilla – Bug 579642
[oggdemux] handle broken ogg/vorbis files better
Last modified: 2009-05-12 08:45:26 UTC
Just came across these two Ogg/Vorbis files (possibly ripped using S-J in late 2003/early 2004): http://gstreamer.freedesktop.org/media/incoming/BobMarley-SoulRebel-track06.ogg http://gstreamer.freedesktop.org/media/incoming/BobMarley-SoulRebel-track07.ogg Both don't play with GStreamer, but with vlc/mplayer. One errors out, according to the debug log because it can't find a chain (rotten error message though), the other just silently EOSes and playbin2 hangs forever. oggz-validate has this to say: serialno 0425719003: missing *** bos 536471: serialno 0425719003: Packet belongs to unknown serialno (rinse and repeat) Haven't investigated this further yet. Maybe it's just a WONTFIX, but then the other players play this fine and we probably created the files back in the day.
Those files are seriously corrupted, they contain parts of program code and bits of two ogg files.
Created attachment 133419 [details] [review] fix to parse corrupted oggs better We misused the ogg api, we need to continue the data we gave to the sync layer instead of repeating bits of it. Also ignore invalid pages without bos and just post a warning when we see an unexpected serial number.
Oh, didn't realise they were THAT broken. Must be filesystem corruption somewhere on my side, sorry about that and thanks for looking into this.
Assigning this to Wim so he doesn't forget to commit this after the freeze :)
commit 7e43c107546e29857f11773762e8891690c47e50 Author: Wim Taymans <wim.taymans@collabora.co.uk> Date: Tue Apr 28 11:24:19 2009 +0200 oggdemux: fix abuse of ogg API, handle broken oggs When we feed the ogg sync layer, we need to feed it contiguous data even if the sync layer did not consume all of it yet. This makes sure that it always finds the next page even for more corrupted files. Use a different read_offset for this purpose. since we now keep track of the sync layer, we don't have to reset after finding a start of a page. Add some more debug info for the error paths. Only reset the sync layer when we perform a seek operation. Avoid failure when the next chain has no bos pages but instead simply ignore it. when we receive unknown page serial numbers mid stream, don't fail but post a warning and hope that we get back on track later. Fixes #579642