rtsp-stream: get valid clock-rate from last-sample
authorHyunjun Ko <zzoon.ko@samsung.com>
Mon, 27 Apr 2015 10:35:53 +0000 (19:35 +0900)
committerSebastian Dröge <sebastian@centricular.com>
Mon, 27 Apr 2015 10:41:59 +0000 (12:41 +0200)
clock-rate in last-sample's caps is integer, not unsigned.
To get this value properly, variable needs to be type-casted to int.

https://bugzilla.gnome.org/show_bug.cgi?id=747614

gst/rtsp-server/rtsp-stream.c

index 8a4abed..339971f 100644 (file)
@@ -2502,7 +2502,8 @@ gst_rtsp_stream_get_rtpinfo (GstRTSPStream * stream,
         if (clock_rate) {
           GstStructure *s = gst_caps_get_structure (caps, 0);
 
-          gst_structure_get_uint (s, "clock-rate", clock_rate);
+          gst_structure_get_int (s, "clock-rate", (gint *) clock_rate);
+
           if (*clock_rate == 0 && running_time)
             *running_time = GST_CLOCK_TIME_NONE;
         }