h264parse: do not try to read from a non existent VUI

https://bugzilla.gnome.org/show_bug.cgi?id=658800
This commit is contained in:
Vincent Penquerc'h 2011-09-12 11:17:20 +01:00 committed by Sebastian Dröge
parent b8f9c3b39d
commit ac5121eb01

View file

@ -1468,6 +1468,7 @@ gst_h264_parse_sps (GstH264NalUnit * nalu, GstH264SPS * sps,
sps->width = width;
sps->height = height;
if (vui) {
/* derive framerate */
/* FIXME verify / also handle other cases */
GST_LOG ("Framerate: %u %u %u %u", parse_vui_params,
@ -1482,6 +1483,11 @@ gst_h264_parse_sps (GstH264NalUnit * nalu, GstH264SPS * sps,
sps->fps_den *= 2;
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");
}
sps->valid = TRUE;