rtph26xpay: Fix the default framerate
authorCarlos Falgueras García <cfalgueras@fluendo.com>
Wed, 18 Dec 2024 14:15:22 +0000 (15:15 +0100)
committerGStreamer Marge Bot <gitlab-merge-bot@gstreamer-foundation.org>
Thu, 19 Dec 2024 11:55:29 +0000 (11:55 +0000)
Use 0/1 instead of 0/0 as the default framerate for rtph26{4,5}pay.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8176>

subprojects/gst-plugins-good/gst/rtp/gstrtph264pay.c
subprojects/gst-plugins-good/gst/rtp/gstrtph265pay.c

index 6c12b6c5798d4228d6b3a4cead776578b24bb1c1..8bfcda7fa85d864194b06750006f9c0e8060f25c 100644 (file)
@@ -575,9 +575,10 @@ gst_rtp_h264_pay_setcaps (GstRTPBasePayload * basepayload, GstCaps * caps)
       rtph264pay->stream_format = GST_H264_STREAM_FORMAT_BYTESTREAM;
   }
 
-  if (!gst_structure_get_fraction (str, "framerate", &rtph264pay->fps_num,
-          &rtph264pay->fps_denum))
-    rtph264pay->fps_num = rtph264pay->fps_denum = 0;
+  rtph264pay->fps_num = 0;
+  rtph264pay->fps_denum = 1;
+  gst_structure_get_fraction (str, "framerate", &rtph264pay->fps_num,
+      &rtph264pay->fps_denum);
 
   /* packetized AVC video has a codec_data */
   if ((value = gst_structure_get_value (str, "codec_data"))) {
index eae0ad443b81314852e9d1a41b206dde0e4f4ae6..2c41d3550a881b03ed026b55e09718ec5c7dcc8e 100644 (file)
@@ -604,9 +604,10 @@ gst_rtp_h265_pay_setcaps (GstRTPBasePayload * basepayload, GstCaps * caps)
       rtph265pay->stream_format = GST_H265_STREAM_FORMAT_BYTESTREAM;
   }
 
-  if (!gst_structure_get_fraction (str, "framerate", &rtph265pay->fps_num,
-          &rtph265pay->fps_denum))
-    rtph265pay->fps_num = rtph265pay->fps_denum = 0;
+  rtph265pay->fps_num = 0;
+  rtph265pay->fps_denum = 1;
+  gst_structure_get_fraction (str, "framerate", &rtph265pay->fps_num,
+      &rtph265pay->fps_denum);
 
 
   /* packetized HEVC video has a codec_data */