GNOME Bugzilla – Bug 481279
[mpegtsparse] partial corruption of the output stream
Last modified: 2007-10-01 09:22:35 UTC
Please describe the problem: Some data has been corrupted on the output streams (pads "program_%d") and resulted streams are not playable using vlc (it works with mplayer). Steps to reproduce: 1. First, apply the patch http://bugzilla.gnome.org/attachment.cgi?id=96324&action=view (This allows to use mpegtsparse with gst-launch) 2. Then run the following graph: gst-launch filesrc location=multiple.ts ! mpegtsparse program-numbers=1026 name=parser parser.program_1026 ! filesink location=single.ts 3. open the generated transport stream with vlc Actual results: VLC has a very strange behavior while playing the video (audio discontinuities, many error messages) Expected results: VLC should work perfectly. Does this happen every time? yes Other information:
Created attachment 96326 [details] [review] proposed fix (bad pointer dereference operation)
Any reason why you changed MAX_CONTINUITY from 16 to 15? :)
Because in the MPEG-TS standard, the continuity counter is coded on 4bits and the maximum value is 15 (after it falls back again to zero). If this flag is not modified, many valid packets are dropped...
Thanks for clarifying... looks good then :) I'll commit it then soonish...
2007-10-01 Sebastian Dröge <slomo@circular-chaos.org> Patch by: mutex at runbox dot com * gst/mpegtsparse/mpegtspacketizer.c: (mpegts_packetizer_parse_adaptation_field_control): * gst/mpegtsparse/mpegtsparse.c: (mpegts_parse_base_init), (mpegts_parse_init), (mpegts_parse_push): * gst/mpegtsparse/mpegtsparse.h: Remove useless src pad that only results in not linked errors, fix a broken pointer dereference and make MAX_CONTINUITY constant conform to the standard to stop outputting corrupted data. Fixes #481276, #481279.