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 532820 - [mpegtsdemux] garbled display
[mpegtsdemux] garbled display
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-bad
git master
Other All
: Normal normal
: 0.10.23
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2008-05-12 18:18 UTC by Robert Millan
Modified: 2011-05-26 15:12 UTC
See Also:
GNOME target: ---
GNOME version: 2.21/2.22


Attachments
gdb backtrace (2.65 KB, text/plain)
2008-05-12 19:20 UTC, Robert Millan
Details
screenshot (112.62 KB, image/png)
2008-05-12 22:01 UTC, Robert Millan
Details

Description Robert Millan 2008-05-12 18:18:55 UTC
Steps to reproduce:
1. download http://www.olmosconsulting.com/m2ts.tar.gz
2. extract samplevideo.m2ts (md5sum 6335302ed9fccb95e792c7e5dd656e8f)
3. totem samplevideo.m2ts


Stack trace:
Unfortunately it does not segfault when run inside gdb.  Instead, it just doesn't play anything (the UI is still responsive though).

I observed that for bigger *.m2ts files (from a blu-ray disc), it won't segfault regardless of whether run in gdb or not, and just get stuck.


Other information:
Comment 1 Bastien Nocera 2008-05-12 18:23:32 UTC
Thanks for taking the time to report this bug.
Without a stack trace from the crash it's very hard to determine what caused it.
Can you get us a stack trace? Please see http://live.gnome.org/GettingTraces for more information on how to do so. Thanks in advance!
Comment 2 Robert Millan 2008-05-12 18:27:11 UTC
Unfortunately it does not segfault when run inside gdb.  Instead, it just
doesn't play anything (the UI is still responsive though).

I observed that for bigger *.m2ts files (from a blu-ray disc), it won't
segfault regardless of whether run in gdb or not, and just get stuck.
Comment 3 Robert Millan 2008-05-12 18:30:20 UTC
Uhm now that I check, in fact it does. Just not always... looks like a race to me.

Just a minute, I'll bring that backtrace.
Comment 4 Robert Millan 2008-05-12 19:20:22 UTC
Created attachment 110795 [details]
gdb backtrace
Comment 5 Robert Millan 2008-05-12 22:01:14 UTC
Created attachment 110810 [details]
screenshot

I upgraded gstreamer0.10-ffmpeg to 0.10.3-7 following advice from Sven Arvidsson in Debian BTS (#480914), and the segfaulting/stalling problem disappears.

Audio and video are displayed, but the output is crippled (see attached screenshot).  It looks similar to what VLC & older versions of mplayer display.  Possibly mplayer in SVN contains a branch of ffmpeg code which fixes this?  I'll check about that tomorrow.
Comment 6 Sebastian Dröge (slomo) 2008-05-13 06:48:52 UTC
This is most likely a bug in the ffmpeg that is provided by Debian. Could you check if you get the same bug with gst-ffmpeg built with the internal ffmpeg, best would be to try this with the latest pre-release: http://gstreamer.freedesktop.org/src/gst-ffmpeg/pre/gst-ffmpeg-0.10.3.2.tar.bz2
Please reopen the bug if this still happens with gst-ffmpeg's internal ffmpeg.

Also, you could check if this is still happening with the gstreamer0.10-ffmpeg package from Debian/experimental.
Comment 7 Robert Millan 2008-05-13 11:29:34 UTC
(In reply to comment #6)
> This is most likely a bug in the ffmpeg that is provided by Debian. Could you
> check if you get the same bug with gst-ffmpeg built with the internal ffmpeg,
> best would be to try this with the latest pre-release:
> http://gstreamer.freedesktop.org/src/gst-ffmpeg/pre/gst-ffmpeg-0.10.3.2.tar.bz2
> Please reopen the bug if this still happens with gst-ffmpeg's internal ffmpeg.

Same result.

> Also, you could check if this is still happening with the gstreamer0.10-ffmpeg
> package from Debian/experimental.

Yes :-(

Interestingly, when I tried linking the system-wide ffplay against the gst-ffmpeg's internal ffmpeg from gst-ffmpeg-0.10.3.2.tar.bz2:

$ LD_LIBRARY_PATH=libavdevice:libavutil:libavformat:libavcodec:libpostproc /usr/bin/ffplay samplevideo.m2ts

then it works fine.  So it doesn't seem to be a problem with ffmpeg.
Comment 8 Edward Hervey 2008-05-13 15:14:12 UTC
it doesn't crash here with all cvs on a 64bit machine, but doesn't "play".

The output is definitely garbled though (both audio and video).

Maybe it's related to the demuxer. (using flutsdemux here)
Comment 9 Edward Hervey 2008-05-13 15:37:17 UTC
mplayer was reporting the same *issues* that you can see in the terminal : 

GStreamer:
0:00:00.479305449 15140       0x723d80 ERROR               ffmpeg :0:: left block unavailable for requested intra mode at 0 64
0:00:00.479399982 15140       0x723d80 ERROR               ffmpeg :0:: error while decoding MB 0 64, bytestream (5623)
0:00:00.508696574 15140       0x723d80 ERROR               ffmpeg :0:: B picture before any references, skipping
0:00:00.508738721 15140       0x723d80 ERROR               ffmpeg :0:: decode_slice_header error
0:00:00.508751474 15140       0x723d80 ERROR               ffmpeg :0:: no frame!
0:00:00.508849200 15140       0x723d80 ERROR               ffmpeg :0:: B picture before any references, skipping
0:00:00.508860922 15140       0x723d80 ERROR               ffmpeg :0:: decode_slice_header error
0:00:00.508870933 15140       0x723d80 ERROR               ffmpeg :0:: no frame!
0:00:00.509133411 15140       0x723d80 ERROR               ffmpeg :0:: B picture before any references, skipping
0:00:00.509147474 15140       0x723d80 ERROR               ffmpeg :0:: decode_slice_header error
0:00:00.509157495 15140       0x723d80 ERROR               ffmpeg :0:: no frame!

mplayer:
[h264 @ 0xa7a4c0]B picture before any references, skipping?,?% 0 0 
[h264 @ 0xa7a4c0]decode_slice_header error
[h264 @ 0xa7a4c0]no frame!
Error while decoding frame!
[h264 @ 0xa7a4c0]B picture before any references, skipping?,?% 0 0 
[h264 @ 0xa7a4c0]decode_slice_header error
[h264 @ 0xa7a4c0]no frame!
Error while decoding frame!
[h264 @ 0xa7a4c0]B picture before any references, skipping?,?% 0 0 
[h264 @ 0xa7a4c0]decode_slice_header error
[h264 @ 0xa7a4c0]no frame!
Error while decoding frame!
[h264 @ 0xa7a4c0]B picture before any references, skipping?,?% 0 0 
[h264 @ 0xa7a4c0]decode_slice_header error
Comment 10 Christian Fredrik Kalager Schaller 2008-06-20 11:40:35 UTC
Neither GStreamer, mplayer or Xine is able to play this. My guess is that the file is broken and not the players. Setting as Needinfo to allow for anyone to report otherwise.
Comment 11 Robert Millan 2008-06-20 12:01:48 UTC
(In reply to comment #10)
> Neither GStreamer, mplayer or Xine is able to play this. My guess is that the
> file is broken and not the players. Setting as Needinfo to allow for anyone to
> report otherwise.

I can play this with perfect video output using the minimalistic "ffplay" utility that comes with ffmpeg (0.svn20080206-8).

Surprisingly, for other players which are linked against the same ffmpeg sources (set this way in debian packages), output is garbled.
Comment 12 Edward Hervey 2009-03-06 08:30:19 UTC
moving to gst-ffmpeg
Comment 13 Edward Hervey 2009-03-06 08:36:04 UTC
In fact, we're gonna move this one to -bad.

It doesn't segfault here (still). but I've observed the following:

* filesrc location=/data/medias/samplevideo.m2ts ! mpegtsdemux ! ffdec_h264 ! queue ! xvimagesink
  This displays garbled video

* filesrc location=/data/medias/samplevideo.m2ts ! ffdemux_mpegts ! ffdec_h264 ! queue ! xvimagesink
  This displays the video fine.

So my guess is something wrong in mpegtsdemux.

Oh, and latest mplayer (SVN-r28450) plays this fine btw.
Comment 14 Christian Fredrik Kalager Schaller 2011-05-26 15:12:43 UTC
Just tested this with current mpegtsdemux and it works fine. Closing this as fixed.