[FFmpeg-devel] [PATCH][4/4] Enable use of the extended API

Björn Axelsson bjorn.axelsson
Fri Dec 14 11:52:29 CET 2007


On Thu, 2007-12-13 at 23:26 +0100, Michael Niedermayer wrote:
[...]
> [...]
> > @@ -1093,6 +1101,20 @@
> >      return 0;
> >  }
> >  
> > +static int asf_read_play(AVFormatContext *s)
> > +{
> > +    if (s->pb && s->pb->read_play)
> > +        return av_url_read_fplay(s->pb);
> > +    return AVERROR(ENOSYS);
> > +}
> > +
> > +static int asf_read_pause(AVFormatContext *s)
> > +{
> > +    if (s->pb && s->pb->read_pause)
> > +        return av_url_read_fpause(s->pb);
> > +    return AVERROR(ENOSYS);
> > +}
> > +
> >  AVInputFormat asf_demuxer = {
> >      "asf",
> >      "asf format",
> > @@ -1103,4 +1125,6 @@
> >      asf_read_close,
> >      asf_read_seek,
> >      asf_read_pts,
> > +    .read_play  = asf_read_play,
> > +    .read_pause = asf_read_pause,
> >  };
> 
> i think the 2 functions above could be defaults if read_play/read_pause
> are NULL
> 
> that is
> int av_read_pause(AVFormatContext *s)
> {
>     if(s->iformat->read_pause)
>         return s->iformat->read_pause(s);
>     if(s->pb && s->pb->read_pause)
>         return av_url_read_fpause(s->pb);
>     return AVERROR(ENOSYS);
> }
> 
> [...]

Yes, that makes sense. New patch attached.

Please let me know if you want the related av_url_read_fseek() API
change patch resent in a separate mail.

-- 
Bj?rn Axelsson                    Phone: +46-(0)90-18 98 97
Intinor AB                          Fax: +46-(0)920-757 10
www.intinor.se
Interactive Television & Digital Media Distribution
-------------- next part --------------
A non-text attachment was scrubbed...
Name: api_extension_enable.diff
Type: text/x-patch
Size: 1584 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20071214/8824ce1f/attachment.bin>



More information about the ffmpeg-devel mailing list