After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 626463 - [matroskademux] "reading large block of size 14688496 not supported"
[matroskademux] "reading large block of size 14688496 not supported"
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-good
git master
Other Linux
: Normal normal
: 0.10.26
Assigned To: Mark Nauwelaerts
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2010-08-09 17:37 UTC by Dmitrij Rebrov
Modified: 2010-09-06 12:54 UTC
See Also:
GNOME target: ---
GNOME version: 2.29/2.30


Attachments
matroskademux: Allow block sizes up to 50MB instead of 10MB (1.79 KB, patch)
2010-08-10 07:43 UTC, Sebastian Dröge (slomo)
rejected Details | Review
matroskademux: not so fatal error handling (10.32 KB, patch)
2010-08-17 13:38 UTC, Mark Nauwelaerts
committed Details | Review

Description Dmitrij Rebrov 2010-08-09 17:37:25 UTC
I met strange .mkv file which my totem player cant handle.
Here it is:
http://dl.dropbox.com/u/9476941/%5BGod-Speed%20Subs%5D%20Seitokai%20Yakuindomo%2005%20%5B480p%5D%5B883AF6D6%5D.mkv

Here is log which gives totem player:

matroska-demux.c(5113): gst_matroska_demux_check_read_size (): /GstPlayBin2:play/GstURIDecodeBin:uridecodebin0/GstDecodeBin2:decodebin20/GstMatroskaDemux:matroskademux0:
reading large block of size 14688496 not supported; file might be corrupt.

MPlayer plays file correctly.
Comment 1 Marc-Andre Lureau 2010-08-09 18:00:33 UTC
Same with webm files, not the difference multifilesrc != filesrc here:

$ gst-launch multifilesrc location=file ! matroskademux ! fakesink 

ERROR: del elemento /GstPipeline:pipeline0/GstMatroskaDemux:matroskademux0: No se pudo demultiplexar el flujo.
Información adicional de depuración:
matroska-demux.c(5397): gst_matroska_demux_check_read_size (): /GstPipeline:pipeline0/GstMatroskaDemux:matroskademux0:
reading large block of size 236549635 not supported; file might be corrupt.

However gst-launch filesrc location=file ! matroskademux ! fakesink is fine.
Comment 2 Sebastian Dröge (slomo) 2010-08-10 07:43:42 UTC
Created attachment 167482 [details] [review]
matroskademux: Allow block sizes up to 50MB instead of 10MB

Fixes bug #626463.
Comment 3 Sebastian Dröge (slomo) 2010-08-10 07:44:40 UTC
(In reply to comment #2)
> Created an attachment (id=167482) [details] [review]
> matroskademux: Allow block sizes up to 50MB instead of 10MB
> 
> Fixes bug #626463.

This should fix it. 10MB blocks are not really too large I guess so let's increase the limit to 50MB...

But maybe this check should be completely removed or increased even more... oppinions?
Comment 4 Sebastian Dröge (slomo) 2010-08-10 07:50:10 UTC
FWIW this patch only fixes the error, the file still doesn't play in totem and stays at 0 seconds.
Comment 5 Mark Nauwelaerts 2010-08-10 19:23:19 UTC
In this particular case, the chunk in question is Attachment, and that may also be the case for the aforementioned webm case (of size 236549635 = 236M).

I would keep the check, and 50M is already a lot, which is unlikely for any blockgroup etc.  Any larger blocks are (as it says) likely corruption or something not quite vital.  It seems not recommended trying to go for 236M (and maybe all the attachment tags that will ensue) (at least painful for embedded cases).

On the other hand, where possible, it should not be considered fatal (and likewise so for other matroskademux error cases).  I'll be having a look at that (and also what else is going on here).
Comment 6 Marc-Andre Lureau 2010-08-10 19:26:51 UTC
(In reply to comment #5)
> 
> On the other hand, where possible, it should not be considered fatal (and
> likewise so for other matroskademux error cases).  I'll be having a look at
> that (and also what else is going on here).

regarding the comment #1, have you noted that I use filesrc without error, but using multifilesrc, it does produce the large block error.  Thanks for looking at it
Comment 7 Mark Nauwelaerts 2010-08-10 20:10:35 UTC
(In reply to comment #6)
> (In reply to comment #5)
> > 
> > On the other hand, where possible, it should not be considered fatal (and
> > likewise so for other matroskademux error cases).  I'll be having a look at
> > that (and also what else is going on here).
> 
> regarding the comment #1, have you noted that I use filesrc without error, but
> using multifilesrc, it does produce the large block error.  Thanks for looking
> at it

That is (most likely) due to multifilesrc making matroskademux operate in push mode, and then it will also complain when it has to skip past large sized blocks, which I believe to make sense and to be fatal (as trying to skip past 236M e.g. http-wise may look more like hanging than anything else).
Comment 8 Mark Nauwelaerts 2010-08-12 09:22:16 UTC
Following -base commit should finally have this file playing again (with or without subtitles):

commit 9fdda29965dc368979251626730b8c9d1bb0da65
Author: Mark Nauwelaerts <mark.nauwelaerts@collabora.co.uk>
Date:   Wed Aug 11 10:27:35 2010 +0200

    playbin2/playsink: update subtitle handling for streamsynchronizer
    
    Streamsynchronizer excepts to see stream-changed msg for all streams, but to
    arrange for this, video and subtitle streams need to be decoupled by means
    of queues (due to pad blocks that may occur).
    
    Fixes #626463.
Comment 9 Marc-Andre Lureau 2010-08-12 14:30:06 UTC
Should I open another bug for `gst-launch multifilesrc location=%d ! matroskademux ! fakesink` error?
Comment 10 Mark Nauwelaerts 2010-08-12 14:44:11 UTC
One might, but as noted above, I see no (general nice) way of handling/skipping 236M in streaming mode.
Comment 11 Tim-Philipp Müller 2010-08-14 13:20:18 UTC
What's up with the patch? Should it be committed or not? (does it only apply for pull mode? Not sure if allowing 50MB chunks in push mode makes much sense)
Comment 12 Mark Nauwelaerts 2010-08-14 17:16:13 UTC
I have some patches (pending) that tune matroskademux' error complaining a bit.
In particular, a large block in push mode will be fatal (as is), and will be discarded with some warning in pull mode.
Comment 13 Dmitrij Rebrov 2010-08-17 12:43:46 UTC
I met more files with same problem. I think patch fixing that bug will be actual.
Comment 14 Mark Nauwelaerts 2010-08-17 13:38:43 UTC
Created attachment 168079 [details] [review]
matroskademux: not so fatal error handling

This is pending patch alluded to above that should make matroskademux complain a bit less.  In particular, a too large block should be skipped (in pull mode).

One might still tweak 10M to a limit that is both reasonable to read and parse in pull mode, and too much to skip in push mode (but 50M definitely seems an upper bound for that, and possibly less).
Comment 15 Sebastian Dröge (slomo) 2010-08-19 12:50:23 UTC
Comment on attachment 168079 [details] [review]
matroskademux: not so fatal error handling

Looks good :)
Comment 16 Mark Nauwelaerts 2010-09-06 12:53:47 UTC
commit 4d9c1e99f208f67bbf10753c8b302ebcc4325e69
Author: Mark Nauwelaerts <mark.nauwelaerts@collabora.co.uk>
Date:   Mon Aug 16 16:05:41 2010 +0200

    matroskademux: not so fatal error handling
    
    If some bits out of place in block(group) parsing, forego and move to next.
    Also skip large blocks in pull mode, but need to give up in push mode.
    
    Fixes #626463.
    Improves #620790.