[FFmpeg-devel] [PATCH] RTSP-MS 4/15: blocksize detection

Michael Niedermayer michaelni
Thu Jan 8 02:50:52 CET 2009


On Wed, Jan 07, 2009 at 08:40:18PM -0500, Ronald S. Bultje wrote:
> 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. :-).

Please dont send 
Type: application/octet-stream
patches

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Many things microsoft did are stupid, but not doing something just because
microsoft did it is even more stupid. If everything ms did were stupid they
would be bankrupt already.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20090108/89566b59/attachment.pgp>



More information about the ffmpeg-devel mailing list