GNOME Bugzilla – Bug 696032
mpegtsmux: Downstream force-key-unit events are being assigned the wrong "count"
Last modified: 2015-02-03 20:39:20 UTC
In mpegtsmux/mpegtsmux.c function check_pending_key_unit_event() always assumes that the pending_event is upstream, which is not always the case - function mpegtsmux_sink_event() assigns an event of downstream type to mux->force_key_unit_event, which later gets passed to check_pending_key_unit_event(). In case when the actual event is downstream, parsing it as an upstream one doesn't work right, in particular it assigns wrong values to count variable. In my setup those count values were changing unpredictably or in many cases not changing in subsequent FKU events, and thus propagation of that FKU event downstream would stop. Attached patch fixes the issue. Please note also that there is probably an analogous problem in videoparsers/gsth264parse.c which has almost identical implementation of check_pending_key_unit_event().
Created attachment 239097 [details] [review] Proposed fix
Thanks for the patch. For future patches, please commit in git and use git format-patch to generate the patch to attach here. It allows for easier merge and review. commit 77bafb4dbca76fe160acd76a8bd3811e9c57cbaf Author: Anton Gritsay <anton@angri.ru> Date: Mon Mar 18 08:15:00 2013 +0000 mpegtsmux: parse force key unit events with the correct function Otherwise it won't be parsed and bogus values would be used. https://bugzilla.gnome.org/show_bug.cgi?id=696032