[FFmpeg-devel] [PATCH] RTSP-MS 4/15: blocksize detection
Ronald S. Bultje
rsbultje
Thu Jan 8 02:40:18 CET 2009
Hi,
On Wed, Jan 7, 2009 at 8:15 PM, Michael Niedermayer <michaelni at gmx.at> wrote:
> actually, i see now this thing is on the stack ...
>
> not that this would change my preferrance of simpler code ...
[..]
Is it really that different. Seems both you and Luca B. prefer it, so
I guess I can keep it...
>> @@ -691,6 +691,12 @@
>> } else if (av_stristart(p, "Server:", &p)) {
>> skip_spaces(&p);
>> av_strlcpy(reply->server, p, sizeof(reply->server));
>> + } else if (av_stristart(p, "Blocksize:", &p)) {
>> + int blocksize = strtol(p, NULL, 10);
>> + if (blocksize > 10 * RTP_MAX_PACKET_LENGTH)
>> + av_log(NULL, AV_LOG_ERROR,
> ^^^^
> do not log to NULL please
I moved the av_log() elsewhere (where an actual logging context is
available) and added an error since the stream will most likely just
not work anyway.
Attached patch .1 is the one with av_log() moved into
make_setup_request(), which is where this value is used. I've attached
a .2 just for comparison so you can assess if it is really that much
more difficult and worth the memory save or not. You an ignore if you
wish. :-).
Ronald
-------------- next part --------------
A non-text attachment was scrubbed...
Name: rtsp-ms-blocksize.patch.1
Type: application/octet-stream
Size: 1911 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20090107/24db0c7f/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: rtsp-ms-blocksize.patch.2
Type: application/octet-stream
Size: 2374 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20090107/24db0c7f/attachment-0001.obj>
More information about the ffmpeg-devel
mailing list