GNOME Bugzilla – Bug 681818
h264parse: evaluate vui parameters only when they where parsed and set
Last modified: 2013-01-16 10:55:34 UTC
Created attachment 221105 [details] [review] patch for h264parse to evaluate vui parameters only when they where parsed and set Testpipeline: GST_DEBUG=h264*:5 gst-launch filesrc location=test.mpg ! mpegpsdemux ! h264parse ! fakesink 2>&1 | grep ratio 0:00:00.447200775 1381 0x8d200 INFO h264parse gsth264parse.c:1070:gst_h264_parse_update_src_caps:<h264parse0> aspect ratio idc changed 144 0:00:00.901053845 1381 0x8d200 INFO h264parse gsth264parse.c:1070:gst_h264_parse_update_src_caps:<h264parse0> aspect ratio idc changed 145 .... The Problem is evaluation of vui_parameters which are not set or not parsed (and so h264pase compares uninitialized memory)....
Thanks for noting this, but if I read things right, it should suffice to 0-initialize the SPS VUI parameters (so all the _present flags end up 0), which is done in the following commit: [on master] commit c20d13d8f8e54e3ee01f85d41a9f17ff359b5215 Author: Mark Nauwelaerts <mnauw@users.sourceforge.net> Date: Sat Jan 12 13:15:02 2013 +0100 codecparsers: h264: zero-initialize SPS VUI parameters ... so all 'present' flags indicate no presence of optional parts in case VUI parameters end up not being parsed. Fixes https://bugzilla.gnome.org/show_bug.cgi?id=681818 [on 0.10] commit c20d13d8f8e54e3ee01f85d41a9f17ff359b5215 Author: Mark Nauwelaerts <mnauw@users.sourceforge.net> Date: Sat Jan 12 13:15:02 2013 +0100 codecparsers: h264: zero-initialize SPS VUI parameters ... so all 'present' flags indicate no presence of optional parts in case VUI parameters end up not being parsed. Fixes https://bugzilla.gnome.org/show_bug.cgi?id=681818 [Not sure/clear about 1.0 branch these days ...]
> [Not sure/clear about 1.0 branch these days ...] Feel free to cherry-pick into 1.0 (or whatever the current 'stable release' branch du jour is) if you think a commit is obviously correct or safe / unlikely to break anything.
... and so on 1.0: commit fb900e6bd0d88f0d9ee502dfc349227d2845b6ca Author: Mark Nauwelaerts <mnauw@users.sourceforge.net> Date: Sat Jan 12 13:15:02 2013 +0100 codecparsers: h264: zero-initialize SPS VUI parameters ... so all 'present' flags indicate no presence of optional parts in case VUI parameters end up not being parsed. Fixes https://bugzilla.gnome.org/show_bug.cgi?id=681818