After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 697162 - SDP library is not parsing correctly
SDP library is not parsing correctly
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-base
1.0.6
Other Linux
: Normal normal
: 1.0.7
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2013-04-03 07:08 UTC by Jose Antonio Santos Cadenas
Modified: 2013-04-03 08:06 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch for first listed problem (1.02 KB, patch)
2013-04-03 07:10 UTC, Jose Antonio Santos Cadenas
none Details | Review
Patch for second listed problem (889 bytes, patch)
2013-04-03 07:11 UTC, Jose Antonio Santos Cadenas
none Details | Review
Patch for third listed problem (847 bytes, patch)
2013-04-03 07:12 UTC, Jose Antonio Santos Cadenas
none Details | Review
Patch for second listed problem (889 bytes, patch)
2013-04-03 07:34 UTC, Jose Antonio Santos Cadenas
none Details | Review

Description Jose Antonio Santos Cadenas 2013-04-03 07:08:52 UTC
Try to parse this SDP:

v=0
o=- 123456 0 IN IP4 127.0.0.1
s=TestSession
c=IN IP4 127.0.0.1
t=0 0
m=video 3434 RTP/AVP 96 97
a=rtpmap:96 MP4V-ES/90000
a=rtpmap:97 H263-1998/90000
a=sendrecv
m=audio 4545 RTP/AVP 14
a=recvonly


then convert the GstSDPMessage back to text and you get:

v=0
o=- 123456 0 IN IP4 127.0.0.1
s=TestSession
e=NONE
c=IN IP4 127.0.0.1
m=video 3434/4294967295 RTP/AVP 96 97
a=rtpmap:96 MP4V-ES/90000
a=rtpmap:97 H263-1998/90000
a=sendrecv:
m=audio 4545/4294967295 RTP/AVP 14
a=recvonly:


I can see three problems here:

1. The library is including the email line by default, that is not necessary according to the new rfc4566.
2. A colon is added before attributes that only have a key
3. The Number of ports is invalid, indicating 4294967295

As a solution I attach three patched, one for each problem, that can be squashed if the mantainer consider that are very small.

I think that this patches should be included in 0.10, 1.0 and master branch, but I've only tested them against 1.0.
Comment 1 Jose Antonio Santos Cadenas 2013-04-03 07:10:48 UTC
Created attachment 240465 [details] [review]
Patch for first listed problem
Comment 2 Jose Antonio Santos Cadenas 2013-04-03 07:11:25 UTC
Created attachment 240466 [details] [review]
Patch for second listed problem
Comment 3 Jose Antonio Santos Cadenas 2013-04-03 07:12:02 UTC
Created attachment 240467 [details] [review]
Patch for third listed problem
Comment 4 Jose Antonio Santos Cadenas 2013-04-03 07:31:20 UTC
Sorry the second patch has an error, I'll upload a new version in a minute.
Comment 5 Jose Antonio Santos Cadenas 2013-04-03 07:34:22 UTC
Created attachment 240468 [details] [review]
Patch for second listed problem
Comment 6 Wim Taymans 2013-04-03 08:06:47 UTC
Thanks!

commit 0940dae79399767742dbc591ed2c43609209a15d
Author: Jose Antonio Santos Cadenas <santoscadenas@gmail.com>
Date:   Tue Apr 2 17:09:48 2013 +0200

    sdp: Do not assign -1 to an unsigned variable, use 0 instead
    
    Fixes https://bugzilla.gnome.org/show_bug.cgi?id=697162

commit 83468609d8c8896faf4f0b0706b7f0f4752b1a04
Author: Jose Antonio Santos Cadenas <santoscadenas@gmail.com>
Date:   Tue Apr 2 17:05:36 2013 +0200

    sdp: If attribute value is emply do not print colon character
    
    See https://bugzilla.gnome.org/show_bug.cgi?id=697162

commit 27abdf51bf489a28f50745bbd2329d5a84b67339
Author: Jose Antonio Santos Cadenas <santoscadenas@gmail.com>
Date:   Tue Apr 2 17:03:38 2013 +0200

    sdp: Do not add email line by default
    
    As specified in rfc4566 email line is optional
    
    See https://bugzilla.gnome.org/show_bug.cgi?id=697162