bug in modules/demux/live555.cpp

For questions and discussion that is NOT (I repeat NOT) specific to a certain Operating System.
oldshuren
New Cone
New Cone
Posts: 1
Joined: 11 Jul 2009 04:24

bug in modules/demux/live555.cpp

Postby oldshuren » 11 Jul 2009 04:37

Hi,

I think there is a bug (or typo) in modules/demux/live555.cpp, around line 342, the code

i_sdp += i_read;

if( i_read < i_sdp_max - i_sdp - 1 )
{
p_sdp[i_sdp] = '\0';
break;
}

should be

i_sdp += i_read;

if( 0 < i_sdp_max - i_sdp - 1 )
{
p_sdp[i_sdp] = '\0';
break;
}

Because i_sdp_max - i_sdp -1 is the amount of buffer left, if this amount is greater than 0, it means everything is read into memory. Otherwise we need to increase the buffer and read some more.

The old code works only when the sdp file is small, if the sdp file is bigger than i_sdp_max/2 (initial value is 500) bytes.

Jean-Baptiste Kempf
Site Administrator
Site Administrator
Posts: 37523
Joined: 22 Jul 2005 15:29
VLC version: 4.0.0-git
Operating System: Linux, Windows, Mac
Location: Cone, France
Contact:

Re: bug in modules/demux/live555.cpp

Postby Jean-Baptiste Kempf » 11 Jul 2009 17:45

mail it to vlc-devel.
Jean-Baptiste Kempf
http://www.jbkempf.com/ - http://www.jbkempf.com/blog/category/Videolan
VLC media player developer, VideoLAN President and Sites administrator
If you want an answer to your question, just be specific and precise. Don't use Private Messages.


Return to “General VLC media player Troubleshooting”

Who is online

Users browsing this forum: No registered users and 53 guests