[FFmpeg-devel] [PATCH] RTSP-MS 10/15: ASF header parsing

Michael Niedermayer michaelni
Sun Feb 1 01:32:50 CET 2009


On Sun, Feb 01, 2009 at 12:36:52AM +0100, Michael Niedermayer wrote:
> On Sat, Jan 31, 2009 at 10:23:52AM -0500, Ronald S. Bultje wrote:
> > Hi Michael,
> > 
> > 2009/1/10 Michael Niedermayer <michaelni at gmx.at>:
> > > On Tue, Jan 06, 2009 at 08:49:06AM -0500, Ronald S. Bultje wrote:
> > >> +void ff_wms_parse_sdp_a_line(AVFormatContext *s, const char *p)
> > >> +{
> > >> +    if (av_strstart(p, "pgmpu:data:application/vnd.ms.wms-hdr.asfv1;base64,", &p)) {
> > >> +        ByteIOContext gb;
> > >> +        RTSPState *rt = s->priv_data;
> > >> +        int len = strlen(p) * 6 / 8;
> > >> +        char *buf = av_mallocz(len);
> > >> +        av_base64_decode(buf, p, len);
> > >> +
> > >> +        init_put_byte(&gb, buf, len, 0, NULL, NULL, NULL, NULL);
> > >> +        if (rt->asf_ctx) {
> > >> +            av_close_input_stream(rt->asf_ctx);
> > >> +            rt->asf_ctx = NULL;
> > >> +        }
> > >> +        av_open_input_stream(&rt->asf_ctx, &gb, "", &asf_demuxer, NULL);
> > >
> > >> +        rt->asf_gb_pos = url_ftell(&gb);
> > >
> > > unused
> > >
> > >> +        av_free(buf);
> > >
> > > at that point you have a ByteIOContext in your context with a deallocated
> > > buffer. This is ugly.
> > 
> > Do you want me to set s->gb = NULL; or would you prefer an alternative solution?
> 
> AVFormatContext has no member baned gb, what are you trying to say?

s/baned/named/ it seems my finger was one key to far to the left :)

[...]

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Asymptotically faster algorithms should always be preferred if you have
asymptotical amounts of data
-------------- 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/20090201/47f4805c/attachment.pgp>



More information about the ffmpeg-devel mailing list