[FFmpeg-devel] [PATCH][4/4] Enable use of the extended API
Michael Niedermayer
michaelni
Fri Dec 14 16:29:08 CET 2007
On Fri, Dec 14, 2007 at 11:52:29AM +0100, Bj?rn Axelsson wrote:
> 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.
patch ok
>
> Please let me know if you want the related av_url_read_fseek() API
> change patch resent in a separate mail.
well, if you think the stream_index==-1 case could be usefull then the
patch was bad, if you think its useless then iam fine with it as it was
and theres no need to resend
its not a big thing we can add stream_index==-1 at a later time if it
turns out to be needed for something
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
Let us carefully observe those good qualities wherein our enemies excel us
and endeavor to excel them, by avoiding what is faulty, and imitating what
is excellent in them. -- Plutarch
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20071214/91a1e840/attachment.pgp>
More information about the ffmpeg-devel
mailing list