GNOME Bugzilla – Bug 656927
tsdemux: fix demuxing on a small sample file
Last modified: 2012-05-24 08:26:46 UTC
I know nothing about MPEG, so I'm probably missing obvious things. The third patch is probably not correct, and here for comments only.
Created attachment 194245 [details] [review] tsdemux: do not keep a dangling pointer When removing the current program, it will get freed by the hash table removal callback, so ensure we clear our pointer to it. Fixes a crash later on in gst_ts_demux_push trying to access it.
Created attachment 194246 [details] [review] tsdemux: do not try to compare a PCR with itself for statistics Especially as one of the logs will cause a divide by zero.
Created attachment 194247 [details] [review] tsdemux: fix failure to demux on a small sample file This is likely not correct, as the removal was not accidental, but this fixes demuxing https://bugzilla.gnome.org/attachment.cgi?id=186315. Patch not really meant for applying, but more for attracting comments from people who know more than nothing about MPEG.
There's a last problem with the sample file: The segment duration is calculated from the difference between last and first PCRs. Only one is found, so duration is 0. I see nowhere in this plugin which calculates duration of a buffer though...
Pushed the obviously correct patches, no idea about the remaining patch though commit 66dbdfd4d1146b7660919bdd448f35251517fe8a Author: Vincent Penquerc'h <vincent.penquerch@collabora.co.uk> Date: Fri Aug 19 17:28:54 2011 +0100 tsdemux: do not try to compare a PCR with itself for statistics Especially as one of the logs will cause a divide by zero. https://bugzilla.gnome.org/show_bug.cgi?id=656927 commit b19a5ea1f3a3d928e36a1d626fb0f39614cfda99 Author: Vincent Penquerc'h <vincent.penquerch@collabora.co.uk> Date: Fri Aug 19 13:32:14 2011 +0100 tsdemux: do not keep a dangling pointer When removing the current program, it will get freed by the hash table removal callback, so ensure we clear our pointer to it. Fixes a crash later on in gst_ts_demux_push trying to access it. https://bugzilla.gnome.org/show_bug.cgi?id=656927
This now works fine with current git.