summaryrefslogtreecommitdiff
path: root/ext/smoothstreaming
diff options
context:
space:
mode:
authorTim-Philipp Müller <tim@centricular.com>2016-05-25 10:59:00 +0100
committerTim-Philipp Müller <tim@centricular.com>2016-05-28 10:29:20 +0100
commit7d46d67c59eab6cfda24d43220dfba2b0f9131d3 (patch)
treef7d9f0e33fc73d5ccec880a9c38bc99f0146e86a /ext/smoothstreaming
parente35bc2c2b4d114496ccaa197a1613ee2987f9ec0 (diff)
smoothstreaming: update fps calculation for h264 codec parser API changes
Use new gst_h264_video_calculate_framerate() API instead of fps_n/fps_d fields in SPS struct which are to be removed. Apparently H264 content in MSS is always non-interlaced/progressive, so we can just pass 0 for field_pic_flag and don't need to parse any slice headers first if there's no external signalling. But even if that's not the case the new code is not worse than the existing code. https://msdn.microsoft.com/en-us/library/cc189080%28VS.95%29.aspx https://bugzilla.gnome.org/show_bug.cgi?id=723352
Diffstat (limited to 'ext/smoothstreaming')
-rw-r--r--ext/smoothstreaming/gstmssmanifest.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/ext/smoothstreaming/gstmssmanifest.c b/ext/smoothstreaming/gstmssmanifest.c
index 02e559cf9..1b72e8de1 100644
--- a/ext/smoothstreaming/gstmssmanifest.c
+++ b/ext/smoothstreaming/gstmssmanifest.c
@@ -569,8 +569,13 @@ _gst_mss_stream_add_h264_codec_data (GstCaps * caps, const gchar * codecdatastr)
parseres = gst_h264_parse_sps (&nalu, &sps_struct, TRUE);
if (parseres == GST_H264_PARSER_OK) {
+ gint fps_num, fps_den;
+
+ /* MSS apparently only supports non-interlaced/progressive H.264 content */
+ gst_h264_video_calculate_framerate (&sps_struct, 0, 0, &fps_num, &fps_den);
+
gst_caps_set_simple (caps, "framerate", GST_TYPE_FRACTION,
- sps_struct.fps_num, sps_struct.fps_den, NULL);
+ fps_num, fps_den, NULL);
}
buffer = _make_h264_codec_data (sps, pps);