From 1dd4a6e832bccbcf443d81ae4bce8a7d9e364496 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carlos=20Falgueras=20Garc=C3=ADa?= Date: Wed, 18 Dec 2024 15:15:22 +0100 Subject: [PATCH] rtph26xpay: Fix the default framerate Use 0/1 instead of 0/0 as the default framerate for rtph26{4,5}pay. Part-of: --- subprojects/gst-plugins-good/gst/rtp/gstrtph264pay.c | 7 ++++--- subprojects/gst-plugins-good/gst/rtp/gstrtph265pay.c | 7 ++++--- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/subprojects/gst-plugins-good/gst/rtp/gstrtph264pay.c b/subprojects/gst-plugins-good/gst/rtp/gstrtph264pay.c index 6c12b6c579..8bfcda7fa8 100644 --- a/subprojects/gst-plugins-good/gst/rtp/gstrtph264pay.c +++ b/subprojects/gst-plugins-good/gst/rtp/gstrtph264pay.c @@ -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"))) { diff --git a/subprojects/gst-plugins-good/gst/rtp/gstrtph265pay.c b/subprojects/gst-plugins-good/gst/rtp/gstrtph265pay.c index eae0ad443b..2c41d3550a 100644 --- a/subprojects/gst-plugins-good/gst/rtp/gstrtph265pay.c +++ b/subprojects/gst-plugins-good/gst/rtp/gstrtph265pay.c @@ -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 */