rtpL8pay: don't try to modify a read-only structure
authorMichael Olbrich <m.olbrich@pengutronix.de>
Thu, 19 Jul 2018 15:31:03 +0000 (17:31 +0200)
committerNicolas Dufresne <nicolas.dufresne@collabora.com>
Thu, 19 Jul 2018 18:07:03 +0000 (14:07 -0400)
Just remove the code. It's not doing anything useful anyways. The modified
caps are the result of a caps query, so either not used afterwards of a
reference to some internal caps of another element that should not be
modified.

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

gst/rtp/gstrtpL8pay.c

index 86e7b22..cf2a3b9 100644 (file)
@@ -196,16 +196,10 @@ gst_rtp_L8_pay_getcaps (GstRTPBasePayload * rtppayload, GstPad * pad,
 
       if (gst_structure_get_int (structure, "channels", &channels)) {
         gst_caps_set_simple (caps, "channels", G_TYPE_INT, channels, NULL);
-      } else {
-        /* Support any number of channels, if not explicitly specified */
-        gst_structure_remove_field (structure, "channels");
       }
 
       if (gst_structure_get_int (structure, "clock-rate", &rate)) {
         gst_caps_set_simple (caps, "rate", G_TYPE_INT, rate, NULL);
-      } else {
-        /* Support any rate, if not explicitly specified */
-        gst_structure_remove_field (structure, "rate");
       }
 
     }