mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-06-05 06:58:56 +00:00
h264parser: Remove unused fps_num/fps_den fields
Instead the newly added function should be used to calculate the framerate properly. https://bugzilla.gnome.org/show_bug.cgi?id=723352
This commit is contained in:
parent
7d46d67c59
commit
b5f8b556e9
2 changed files with 0 additions and 22 deletions
|
@ -1498,7 +1498,6 @@ gst_h264_parse_sps_data (NalReader * nr, GstH264SPS * sps,
|
||||||
gint width, height;
|
gint width, height;
|
||||||
guint subwc[] = { 1, 2, 2, 1 };
|
guint subwc[] = { 1, 2, 2, 1 };
|
||||||
guint subhc[] = { 1, 2, 1, 1 };
|
guint subhc[] = { 1, 2, 1, 1 };
|
||||||
GstH264VUIParams *vui = NULL;
|
|
||||||
|
|
||||||
memset (sps, 0, sizeof (*sps));
|
memset (sps, 0, sizeof (*sps));
|
||||||
|
|
||||||
|
@ -1592,7 +1591,6 @@ gst_h264_parse_sps_data (NalReader * nr, GstH264SPS * sps,
|
||||||
if (sps->vui_parameters_present_flag && parse_vui_params) {
|
if (sps->vui_parameters_present_flag && parse_vui_params) {
|
||||||
if (!gst_h264_parse_vui_parameters (sps, nr))
|
if (!gst_h264_parse_vui_parameters (sps, nr))
|
||||||
goto error;
|
goto error;
|
||||||
vui = &sps->vui_parameters;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* calculate ChromaArrayType */
|
/* calculate ChromaArrayType */
|
||||||
|
@ -1631,26 +1629,7 @@ gst_h264_parse_sps_data (NalReader * nr, GstH264SPS * sps,
|
||||||
GST_LOG ("crop_rectangle x=%u y=%u width=%u, height=%u", sps->crop_rect_x,
|
GST_LOG ("crop_rectangle x=%u y=%u width=%u, height=%u", sps->crop_rect_x,
|
||||||
sps->crop_rect_y, width, height);
|
sps->crop_rect_y, width, height);
|
||||||
}
|
}
|
||||||
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,
|
|
||||||
vui->fixed_frame_rate_flag, sps->frame_mbs_only_flag,
|
|
||||||
vui->pic_struct_present_flag);
|
|
||||||
|
|
||||||
if (parse_vui_params && vui->fixed_frame_rate_flag) {
|
|
||||||
sps->fps_num = vui->time_scale;
|
|
||||||
sps->fps_den = vui->num_units_in_tick;
|
|
||||||
/* picture is a frame = 2 fields */
|
|
||||||
sps->fps_den *= 2;
|
|
||||||
GST_LOG ("framerate %d/%d", sps->fps_num, sps->fps_den);
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
GST_LOG ("No VUI, unknown framerate");
|
|
||||||
}
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
|
||||||
error:
|
error:
|
||||||
|
|
|
@ -710,7 +710,6 @@ struct _GstH264SPS
|
||||||
gint width, height;
|
gint width, height;
|
||||||
gint crop_rect_width, crop_rect_height;
|
gint crop_rect_width, crop_rect_height;
|
||||||
gint crop_rect_x, crop_rect_y;
|
gint crop_rect_x, crop_rect_y;
|
||||||
gint fps_num, fps_den;
|
|
||||||
gboolean valid;
|
gboolean valid;
|
||||||
|
|
||||||
/* Subset SPS extensions */
|
/* Subset SPS extensions */
|
||||||
|
|
Loading…
Reference in a new issue