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

Michael Niedermayer michaelni
Thu Jan 8 02:15:11 CET 2009


On Wed, Jan 07, 2009 at 08:01:05PM -0500, Ronald S. Bultje wrote:
> Hi,
> 
> On Wed, Jan 7, 2009 at 7:51 PM, Michael Niedermayer <michaelni at gmx.at> wrote:
> > On Wed, Jan 07, 2009 at 07:17:17PM -0500, Ronald S. Bultje wrote:
> >> On Wed, Jan 7, 2009 at 7:11 PM, Luca Barbato <lu_zero at gentoo.org> wrote:
> >> > I meant that since we have to decide an arbitrary upper bound we could
> >> > use it (wasting some memory) instead of parsing the Blocksize and adding
> >> > some more code. Your current solution (av_clip) is fine as well,
> >>
> >> I'll keep what I have, just because it saves some memory for virtually
> >> all RTSP streams.
> >
> > what kind of memory can it waste?
> > the virtual, it will be allocated once it has been written to ?
> > or is it actually written to?
> 
> Really? See, I don't do kinky stuff like that, so I have no idea. :-).

actually, i see now this thing is on the stack ...

not that this would change my preferrance of simpler code ...


[...]

> Index: ffmpeg-svn/libavformat/rtsp.c
> ===================================================================
> --- ffmpeg-svn.orig/libavformat/rtsp.c	2009-01-07 10:11:47.000000000 -0500
> +++ ffmpeg-svn/libavformat/rtsp.c	2009-01-07 19:58:05.000000000 -0500
> @@ -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

anyway patch review left for the maintainer, i have too many things to review
that i am maintainer of ...

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

The greatest way to live with honor in this world is to be what we pretend
to be. -- Socrates
-------------- 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/57603150/attachment.pgp>



More information about the ffmpeg-devel mailing list