media: use new api
authorWim Taymans <wim.taymans@collabora.co.uk>
Thu, 4 Aug 2011 06:59:17 +0000 (08:59 +0200)
committerWim Taymans <wim.taymans@collabora.co.uk>
Thu, 4 Aug 2011 06:59:17 +0000 (08:59 +0200)
gst/rtsp-server/rtsp-media.c

index a7c9810..8166221 100644 (file)
@@ -299,7 +299,6 @@ do_loop (GstRTSPMediaClass * klass)
 static void
 collect_media_stats (GstRTSPMedia * media)
 {
-  GstFormat format;
   gint64 position, duration;
 
   media->range.unit = GST_RTSP_RANGE_NPT;
@@ -311,15 +310,15 @@ collect_media_stats (GstRTSPMedia * media)
     media->range.max.seconds = -1;
   } else {
     /* get the position */
-    format = GST_FORMAT_TIME;
-    if (!gst_element_query_position (media->pipeline, &format, &position)) {
+    if (!gst_element_query_position (media->pipeline, GST_FORMAT_TIME,
+            &position)) {
       GST_INFO ("position query failed");
       position = 0;
     }
 
     /* get the duration */
-    format = GST_FORMAT_TIME;
-    if (!gst_element_query_duration (media->pipeline, &format, &duration)) {
+    if (!gst_element_query_duration (media->pipeline, GST_FORMAT_TIME,
+            &duration)) {
       GST_INFO ("duration query failed");
       duration = -1;
     }