Commit fd4eb2e2 authored by René Stadler's avatar René Stadler

h264parser: fix access to uninitialized memory

When vui->timing_info_present is 0, vui->fixed_frame_rate_flag and others
cannot be accessed since they have not been set.

It was also possible that sps->fps_{num,den} end up initialized here.
parent 8f1a6789
......@@ -1468,7 +1468,10 @@ gst_h264_parse_sps (GstH264NalUnit * nalu, GstH264SPS * sps,
sps->width = width;
sps->height = height;
if (vui) {
sps->fps_num = 0;
sps->fps_den = 1;
if (vui && vui->timing_info_present_flag) {
/* derive framerate */
/* FIXME verify / also handle other cases */
GST_LOG ("Framerate: %u %u %u %u", parse_vui_params,
......@@ -1484,8 +1487,6 @@ gst_h264_parse_sps (GstH264NalUnit * nalu, GstH264SPS * sps,
GST_LOG ("framerate %d/%d", sps->fps_num, sps->fps_den);
}
} else {
sps->fps_num = 0;
sps->fps_den = 1;
GST_LOG ("No VUI, unknown framerate");
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment