[Ffmpeg-devel] [PATCH] RTP/Get Duration of file (for seeking in stream)

Ryan Martell rdm4
Mon Nov 6 21:15:21 CET 2006


Hi-

On Nov 6, 2006, at 1:08 PM, Guillaume POIRIER wrote:

> Hi,
>
> On 11/6/06, Michael Niedermayer <michaelni at gmx.at> wrote:
>> Hi
>>
>> On Mon, Nov 06, 2006 at 11:39:27AM -0600, Ryan Martell wrote:
>> > Hi--
>> >
>> > Attached is a patch to rtsp.c that will fill in the start and
>> > duration of a movie (if known) from the sdp so that the seeking
>> > function of rtsp will work.
>> >
>> > Thanks!
>> > -Ryan
>> > +static void rtsp_parse_range_npt(const char *p, int64_t *start,  
>> int64_t *end)
>> > +{
>
> Please add doxygen comments to this function (yeah, I know the
> original function didn't have comments, but let's improve code
> documentation while we are at it.
> ;-)

We passed in the mail, I'd already fixed Michaels!

>> > +            // this is so that seeking on a streamed file can  
>> work.
>> > +            rtsp_parse_range_npt(p, &start, &end);
>> > +            s->start_time= start;
>> > +            s->duration= end - start;
>>
>> duration should be under if(end != AV_NOPTS_VALUE) otherwise it could
>> end up with a weird value
>>
>> and ideally rtsp_parse_range_npt() should be moved in a seperate  
>> patch&commit
>> but iam ok with it in the same patch too, its small and fairly  
>> readable
>
> Ryan, please fix this and add doxy comments and I'll apply your patch.
>
> Guillaume

Here you go.

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

PS: Thanks for the sympathy on my laptop.  It's the sort of thing  
that make you want to live under more draconian laws- where thieves  
get their hands cut off...



More information about the ffmpeg-devel mailing list