[FFmpeg-devel] [PATCH/v3.1] rmdec.c/rm.h changes to allow rtsp
Michael Niedermayer
michaelni
Sun Jul 22 19:18:59 CEST 2007
Hi
On Sat, Jul 21, 2007 at 09:42:51PM -0400, Ronald S. Bultje wrote:
> Hi,
>
> On 7/21/07, Michael Niedermayer <michaelni at gmx.at> wrote:
> >
> >On Sat, Jul 21, 2007 at 04:00:04PM -0400, Ronald S. Bultje wrote:
> >> following Michael's comments, here's 4 patches (v3.1-4) for rm.h
> >/rmdec.c.
> >>
> >> The first one fixes get_str/get_str8() to also work if the target string
> >is
> >> not long enough to fit all data from the container string, and allows
> >NULL
> >> as a string also to simply skip the string alltogether.
> >
> >patch ok
> >btw, as you are already working with the code ...
> >maybe you want to merge get_str() and get_str8()
> >a 1 line difference doesnt merit having a second function ...
>
>
> Makes sense. How about $attached?
[...]
> Index: ffmpeg/libavformat/rmdec.c
> ===================================================================
> --- ffmpeg.orig/libavformat/rmdec.c 2007-07-21 15:50:32.000000000 -0400
> +++ ffmpeg/libavformat/rmdec.c 2007-07-21 18:05:38.000000000 -0400
> @@ -22,32 +22,29 @@
> #include "rm.h"
> #include "avstring.h"
>
> -static void get_str(ByteIOContext *pb, char *buf, int buf_size)
> +static inline void get_str_i(ByteIOContext *pb, char *buf, int buf_size, int len_bytes)
> {
> int len, i;
> - char *q;
> + char *q, r;
>
> - len = get_be16(pb);
> + len = (len_bytes == 1) ? get_byte(pb) : get_be16(pb);
> q = buf;
> for(i=0;i<len;i++) {
> + r = get_byte(pb);
> if (i < buf_size - 1)
> - *q++ = get_byte(pb);
> + *q++ = r;
this mixes function merging with a bugfix
please send patches relative to svn+approved patches
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
Those who are too smart to engage in politics are punished by being
governed by those who are dumber. -- Plato
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20070722/c04f25ea/attachment.pgp>
More information about the ffmpeg-devel
mailing list