[Ffmpeg-devel] [PATCH] asf.[ch] patch to handle mms streaming....

Ryan Martell rdm4
Mon Dec 4 16:10:52 CET 2006

On Nov 29, 2006, at 4:15 PM, Michael Niedermayer wrote:

> Hi
> On Tue, Nov 28, 2006 at 06:40:48PM -0600, Ryan Martell wrote:
> [...]
>>> and maybe you could just replace the data_object_size == -1 cases by
>>> == 0 this would avoid haveing to set it to the non-default -1
>> <rant>
>> the asf code has all sorts of random stuff in it; variables that are
>> assigned to and never read, variables that are read from but not
>> really assigned to (except by clearing to zero), etc.   (I found this
>> out when I initially just ripped out the read header and the read
>> packet for a different approach to mms streaming)
>> for example, I don't think this is right:
>>             if((url_ftell(&s->pb) + ret - s->data_offset) % asf-
>>> packet_size)
>>                 ret += asf->packet_size - ((url_ftell(&s->pb) + ret
>> - s->data_offset) % asf->packet_size);
>> as nothing in this file assigns anything to s->data_offset.
> its assigned in utils.c
>> I think
>> they meant to use asf->data_offset.
> asf->data_offset and AVFormatContext->data_offset seem to be  
> redundant,
> the asf-> variant should be droped if they are
> a seperate patch which cleans this and other things up would certainly
> be welcome

Okay; I'll do it once I have time.  I was hoping to also fold asf.h  
into asf.c, but noticed asf_enc.c uses it, so no luck there.
Also, I may need to tweak it anyway to get the mms working- right now  
it's using a URLProtocol, which works for simple streaming, but I  
don't think it will work for pausing, fast forward, etc.- I'll have  
to do an AVInputFormat like rtp did.

> [...]
>> So here's a smaller, tighter patch.
> looks ok

Can someone please commit?


More information about the ffmpeg-devel mailing list