mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-24 02:31:03 +00:00
rtph263depay: Fix framesize parsing
The string passed to the parsing function only contains a framesize, and not <pt> + <framesize> Fixes https://bugzilla.gnome.org/show_bug.cgi?id=726416
This commit is contained in:
parent
8cfebfec8c
commit
5e0329235e
1 changed files with 2 additions and 16 deletions
|
@ -141,24 +141,10 @@ gst_rtp_h263_parse_framesize (GstRTPBaseDepayload * filter,
|
||||||
const gchar * media_attr, GstCaps * srccaps)
|
const gchar * media_attr, GstCaps * srccaps)
|
||||||
{
|
{
|
||||||
gchar *dimension, *endptr;
|
gchar *dimension, *endptr;
|
||||||
gint pt, width, height;
|
gint width, height;
|
||||||
GstStructure *d;
|
GstStructure *d;
|
||||||
|
|
||||||
/* <payload type number> <width>-<height> */
|
width = g_ascii_strtoull (media_attr, &endptr, 10);
|
||||||
|
|
||||||
pt = g_ascii_strtoull (media_attr, &endptr, 10);
|
|
||||||
if (pt != GST_RTP_PAYLOAD_H263) {
|
|
||||||
GST_ERROR_OBJECT (filter,
|
|
||||||
"Framesize media attribute has incorrect payload type");
|
|
||||||
return FALSE;
|
|
||||||
} else if (*endptr != ' ') {
|
|
||||||
GST_ERROR_OBJECT (filter,
|
|
||||||
"Framesize media attribute has invalid payload type separator");
|
|
||||||
return FALSE;
|
|
||||||
}
|
|
||||||
|
|
||||||
dimension = endptr + 1;
|
|
||||||
width = g_ascii_strtoull (dimension, &endptr, 10);
|
|
||||||
if (width <= 0) {
|
if (width <= 0) {
|
||||||
GST_ERROR_OBJECT (filter,
|
GST_ERROR_OBJECT (filter,
|
||||||
"Framesize media attribute width out of valid range");
|
"Framesize media attribute width out of valid range");
|
||||||
|
|
Loading…
Reference in a new issue