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

Ryan Martell rdm4
Tue Nov 28 18:03:27 CET 2006


Hi...

On Nov 28, 2006, at 4:56 AM, Michael Niedermayer wrote:

> Hi
>
> On Mon, Nov 27, 2006 at 05:28:00PM -0600, Ryan Martell wrote:
>> A couple of minor modifications to handle mms streaming.
>>
>> mms streaming patch will be forthcoming (if anyone is interested?)
>
> yes mms support is welcome ...
>
>
> [...]
>
>> Index: asf.c
>> ===================================================================
>> --- asf.c	(revision 7177)
>> +++ asf.c	(working copy)
>> @@ -205,6 +205,11 @@
>>              st->start_time = asf->hdr.preroll;
>>              st->duration = asf->hdr.send_time /
>>                  (10000000 / 1000) - st->start_time;
>> +            if(asf->hdr.flags & 0x01) { // streaming; override  
>> these values
>> +                st->duration= AV_NOPTS_VALUE;
>
> somehow i think this should rather be:
> if(!(asf->hdr.flags & 1))
>     st->duration = asf->hdr.send_time / (10000000 / 1000) - st- 
> >start_time;
> instead of setting it wrongly and then correcting it ...

Well, I was going to do that in a later patch; I was trying to keep  
the modifications down so that it was easiest to diff. ;-)

>> +                asf->nb_packets = asf->hdr.packets_count; //  
>> MAX_VALUE
>
> is this not already set to that?

It was; this was a different problem that I fixed by changing the  
signed issue of nb_packets in asf.h, since packets_count is max value  
on streaming.  Removed.

>> +                asf->packet_timestamp_start = -1; // force the  
>> renumbering of packets (there could be overflow issues here)
>> +            }
>>              get_guid(pb, &g);
>>
>>              test_for_ext_stream_audio = 0;
>> @@ -333,6 +338,9 @@
>>              } else {
>>                  asf->data_object_size = (uint64_t)-1;
>>              }
>> +            if(asf->hdr.flags & 0x01) { // streaming (replace)
>> +                asf->data_object_size = (uint64_t)-1;
>> +            }
>
> why not merge this with the else above?

Because this happens later in the processing.  Value is now set in  
the top case, and if'd out here.

I was trying to make my changes as small and isolated as possible to  
make the patch easy to review, with no indentation changes; my  
original version did the above things!

Here's a patch with the above issues changed; note that this required  
indentation changes, albeit small ones.

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: patch.txt
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20061128/ea2fdd72/attachment.txt>
-------------- next part --------------






More information about the ffmpeg-devel mailing list