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 618336 - [mpegvideoparse] mpegvideoparse makes some streams unplayable
[mpegvideoparse] mpegvideoparse makes some streams unplayable
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-bad
git master
Other Linux
: Normal normal
: 0.10.20
Assigned To: GStreamer Maintainers
GStreamer Maintainers
: 636804 (view as bug list)
Depends on:
Blocks: 589204
 
 
Reported: 2010-05-11 05:35 UTC by Austin Lund
Modified: 2010-12-12 22:49 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Test mpegts part 1 (1000.00 KB, application/octet-stream)
2010-05-11 05:39 UTC, Austin Lund
  Details
Test mpegts part 2 (1000.00 KB, application/octet-stream)
2010-05-11 05:40 UTC, Austin Lund
  Details
Add debugging output in mpegpacketiser. (3.55 KB, patch)
2010-05-12 22:29 UTC, Austin Lund
none Details | Review
Change timestamp handling in mpegpacketiser (4.34 KB, patch)
2010-05-12 22:30 UTC, Austin Lund
none Details | Review
Change timestamp handling in mpegpacketiser (4.28 KB, patch)
2010-06-11 01:08 UTC, Austin Lund
none Details | Review
Add debugging output in mpegpacketiser. (4.14 KB, patch)
2010-06-11 01:09 UTC, Austin Lund
none Details | Review

Description Austin Lund 2010-05-11 05:35:11 UTC
The attached mpegts will not play with playbin never getting out of prerolling.

The culprit can be tracked down the mpegvideoparse.  This plays the file:

gst-launch filesrc location=small.ts ! mpegtsdemux name=ts ts.audio_02a0 ! a52dec ! queue ! pulsesink ts.video_0202 ! queue ! mpeg2dec ! ffmpegcolorspace ! videorate ! queue ! xvimagesink

This does not:

gst-launch filesrc location=small.ts ! mpegtsdemux name=ts ts.audio_02a0 ! a52dec ! queue ! pulsesink ts.video_0202 ! queue ! mpegvideoparse ! mpeg2dec ! ffmpegcolorspace ! videorate ! queue ! xvimagesink
Comment 1 Austin Lund 2010-05-11 05:39:54 UTC
Created attachment 160802 [details]
Test mpegts part 1

File too big for bugzilla.  Concatenate these two files together.
Comment 2 Austin Lund 2010-05-11 05:40:23 UTC
Created attachment 160803 [details]
Test mpegts part 2
Comment 3 Austin Lund 2010-05-12 22:28:35 UTC
I have converted some of the debugging info in mpegpacketiser into the proper form.  I found that in the stream there is no timestamp when a picture packet is sent and the last timestamp was sent at the sequence header which is in another block in the packetiser.  The old code would only look at timestamps for blocks which contain picture headers.  I have tried refactoring the code to make it work for this case.  

I'm attaching two patches.  One for debugging the mpegpacketiser code, the other to change the block timestamp handling.  It does seem to work for me.
Comment 4 Austin Lund 2010-05-12 22:29:40 UTC
Created attachment 160938 [details] [review]
Add debugging output in mpegpacketiser.
Comment 5 Austin Lund 2010-05-12 22:30:06 UTC
Created attachment 160939 [details] [review]
Change timestamp handling in mpegpacketiser
Comment 6 Austin Lund 2010-06-11 01:08:20 UTC
Created attachment 163356 [details] [review]
Change timestamp handling in mpegpacketiser

This patch now applies directly to current git.
Comment 7 Austin Lund 2010-06-11 01:09:40 UTC
Created attachment 163357 [details] [review]
Add debugging output in mpegpacketiser.

This patch now applies on top of the changed timestamp handling and initialises correctly.  It can probably quite easily be merged onto current git without timestamp changes.
Comment 8 Jan Schmidt 2010-06-15 07:26:34 UTC
Fixed the bug differently:

mpegvideoparse: Apply previous timestamp when there isn't any newer.

If the current incoming packet didn't carry a timestamp, but a
previous packet had one we didn't yet use, then apply that timestamp
to the next picture.
Fixes: #618336

I don't like the debugging patch - it should be the other way around, with the packetiser using the mpegvideoparse category, if at all. Also, the debug should be at LOG level - a better level to use for 'high frequency events that occur during non-exception-case processing'
Comment 9 Sebastian Dröge (slomo) 2010-12-12 22:49:05 UTC
*** Bug 636804 has been marked as a duplicate of this bug. ***