[FFmpeg-devel] [PATCH] increase SDP buffer size
Ronald S. Bultje
Sun Aug 31 17:19:27 CEST 2008
On Sun, Aug 31, 2008 at 11:14 AM, Michael Niedermayer <michaelni at gmx.at> wrote:
> On Sun, Aug 31, 2008 at 10:11:53AM -0400, Ronald S. Bultje wrote:
>> I've found some streams with SDP lines longer than 1024 bytes.
>> Currently, rtsp.c discards those extra bytes, leading to incomplete
>> SDP parsing and failure to play/offer some streams (or offer them
>> incorrectly) in the RTSP client.
>> Attached patch detects those, adds an av_log(ERROR) so we can detect
>> when it happens (instead of silently losing data) and increases the
>> buffersize to handle the stream that failed for me like this:
> i think the 1024->2048 is ok even though iam not maintainer
> the rest does not like it is the minimal way to print an error message
> nor that it is correct, i mean the thing should return -1 or something
> like that in case of an error not print a warning and continue with a
> randomly truncated line.
Not sure if I agree: the stream still plays, just some of the higher
rule-numbers will be unavailable (the last one may not function, but
that's hard to detect). In short: if this happens, it won't play at
the highest bitrate. I think in that case a warning is sufficient. I
can change to AV_LOG_WARNING.
More information about the ffmpeg-devel