mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-03-30 20:59:44 +00:00
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.
This commit is contained in:
parent
8f1a67896b
commit
fd4eb2e220
1 changed files with 4 additions and 3 deletions
|
@ -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");
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue