mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 20:21:24 +00:00
rtpjpegpay/-depay: Remove incorrectly introduced framesize SDP attribute
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=726415
This commit is contained in:
parent
f160625ea6
commit
896fc20806
2 changed files with 4 additions and 21 deletions
|
@ -50,7 +50,6 @@ static GstStaticPadTemplate gst_rtp_jpeg_depay_sink_template =
|
|||
/*
|
||||
* "a-framerate = (string) 0.00, "
|
||||
* "x-framerate = (string) 0.00, "
|
||||
* "a-framesize = (string) 1234-1234, "
|
||||
* "x-dimensions = (string) \"1234,1234\", "
|
||||
*/
|
||||
"application/x-rtp, "
|
||||
|
@ -61,7 +60,6 @@ static GstStaticPadTemplate gst_rtp_jpeg_depay_sink_template =
|
|||
/*
|
||||
* "a-framerate = (string) 0.00, "
|
||||
* "x-framerate = (string) 0.00, "
|
||||
* "a-framesize = (string) 1234-1234, "
|
||||
* "x-dimensions = (string) \"1234,1234\""
|
||||
*/
|
||||
)
|
||||
|
@ -458,15 +456,6 @@ gst_rtp_jpeg_depay_setcaps (GstRTPBaseDepayload * depayload, GstCaps * caps)
|
|||
}
|
||||
}
|
||||
|
||||
if ((media_attr = gst_structure_get_string (structure, "a-framesize"))) {
|
||||
gint w, h;
|
||||
|
||||
if (sscanf (media_attr, "%d-%d", &w, &h) == 2) {
|
||||
rtpjpegdepay->media_width = w;
|
||||
rtpjpegdepay->media_height = h;
|
||||
}
|
||||
}
|
||||
|
||||
/* try to get a framerate */
|
||||
media_attr = gst_structure_get_string (structure, "a-framerate");
|
||||
if (!media_attr)
|
||||
|
|
|
@ -296,7 +296,6 @@ gst_rtp_jpeg_pay_setcaps (GstRTPBasePayload * basepayload, GstCaps * caps)
|
|||
gint num = 0, denom;
|
||||
gchar *rate = NULL;
|
||||
gchar *dim = NULL;
|
||||
gchar *size;
|
||||
|
||||
pay = GST_RTP_JPEG_PAY (basepayload);
|
||||
|
||||
|
@ -331,8 +330,6 @@ gst_rtp_jpeg_pay_setcaps (GstRTPBasePayload * basepayload, GstCaps * caps)
|
|||
rate = g_strdup_printf ("%f", framerate);
|
||||
}
|
||||
|
||||
size = g_strdup_printf ("%d-%d", width, height);
|
||||
|
||||
if (pay->width == 0) {
|
||||
GST_DEBUG_OBJECT (pay,
|
||||
"width or height are greater than 2040, adding x-dimensions to caps");
|
||||
|
@ -341,24 +338,21 @@ gst_rtp_jpeg_pay_setcaps (GstRTPBasePayload * basepayload, GstCaps * caps)
|
|||
|
||||
if (rate != NULL && dim != NULL) {
|
||||
res = gst_rtp_base_payload_set_outcaps (basepayload, "a-framerate",
|
||||
G_TYPE_STRING, rate, "a-framesize", G_TYPE_STRING, size,
|
||||
"x-dimensions", G_TYPE_STRING, dim, NULL);
|
||||
G_TYPE_STRING, rate, "x-dimensions", G_TYPE_STRING, dim, NULL);
|
||||
} else if (rate != NULL && dim == NULL) {
|
||||
res = gst_rtp_base_payload_set_outcaps (basepayload, "a-framerate",
|
||||
G_TYPE_STRING, rate, "a-framesize", G_TYPE_STRING, size, NULL);
|
||||
G_TYPE_STRING, rate, NULL);
|
||||
} else if (rate == NULL && dim != NULL) {
|
||||
res = gst_rtp_base_payload_set_outcaps (basepayload, "x-dimensions",
|
||||
G_TYPE_STRING, dim, "a-framesize", G_TYPE_STRING, size, NULL);
|
||||
G_TYPE_STRING, dim, NULL);
|
||||
} else {
|
||||
res = gst_rtp_base_payload_set_outcaps (basepayload, "a-framesize",
|
||||
G_TYPE_STRING, size, NULL);
|
||||
res = gst_rtp_base_payload_set_outcaps (basepayload, NULL);
|
||||
}
|
||||
|
||||
if (dim != NULL)
|
||||
g_free (dim);
|
||||
if (rate != NULL)
|
||||
g_free (rate);
|
||||
g_free (size);
|
||||
|
||||
return res;
|
||||
|
||||
|
|
Loading…
Reference in a new issue