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

Ronald S. Bultje rsbultje
Fri Feb 6 02:26:23 CET 2009


Hi,

On Tue, Feb 3, 2009 at 7:25 AM, Michael Niedermayer <michaelni at gmx.at> wrote:
> On Mon, Feb 02, 2009 at 10:58:29PM -0500, Ronald S. Bultje wrote:
>> Index: ffmpeg-svn/libavformat/rtsp.h
>> ===================================================================
>> --- ffmpeg-svn.orig/libavformat/rtsp.h        2009-02-01 08:18:04.000000000 -0500
>> +++ ffmpeg-svn/libavformat/rtsp.h     2009-02-02 22:57:06.000000000 -0500
>> @@ -108,6 +108,9 @@
>>      int need_subscription;
>>      enum AVDiscard real_setup_cache[MAX_STREAMS];
>>      char last_subscription[1024];
>> +
>> +    /** ASF demuxer context for the embedded ASF stream from WMS servers */
>> +    AVFormatContext *asf_ctx;
>>  } RTSPState;
>
> why is rm/rdt and asf using different things?

So now that rtsp.h is documented (or well, patches submitted), let's
get back to this.

I do think it's possible to move the rdt.c PayloadContext->rmctx to
the rtsp demuxer's RTSPState. This would save some memory on streams
that have both audio and video in the real format.

I don't think we want to merge it with the asf_ctx variable, for two reasons:
1) they are not the same. We'd have to not only check != NULL, but
also the ctx type. Don't forget, malicious RTSP servers could serve
WMS headers in a RM stream (or reversely), and we want to support that
as far as possible (and at the same time be secure). Therefore, I
think it's better to keep them separated. This would also go well with
potential future work of moving WMS/REAL server specific thingies into
their own "server-specific private context" at some point (it's kind
of ugly to keep everything in RTSPState).
2) the theoretical case of supporting an RTSP session containing both
RM and ASF (yes, this is possible - although highly unlikely - and is
supported by the current implementation).
Because of that, I don't think we'd need to hold off this patch for that.

So, questions then:
1) do you want me to move rdt.c's PayloadContext->rmctx to RTSPState?
(Duh, rethorical question, silly me for asking.)
2) can I apply this patch regardless already?

Ronald




More information about the ffmpeg-devel mailing list