[FFmpeg-devel] [PATCH] avfilter/src_movie: add various commands
Michael Niedermayer
michael at niedermayer.cc
Wed May 25 17:20:32 CEST 2016
On Wed, May 25, 2016 at 04:58:04PM +0200, Michael Niedermayer wrote:
> On Wed, Feb 17, 2016 at 11:26:45PM +0700, Muhammad Faiz wrote:
> > On Wed, Feb 17, 2016 at 10:58 PM, wm4 <nfxjfg at googlemail.com> wrote:
> > > On Wed, 17 Feb 2016 22:55:47 +0700
> > > Muhammad Faiz <mfcc64 at gmail.com> wrote:
> > >
> > >> On Wed, Feb 17, 2016 at 10:20 PM, wm4 <nfxjfg at googlemail.com> wrote:
> > >> > On Wed, 17 Feb 2016 21:30:20 +0700
> > >> > Muhammad Faiz <mfcc64 at gmail.com> wrote:
> > >> >
> > >> >> From 6291c06dacbe2aa48a97bf36835ec8a3bce8a40a Mon Sep 17 00:00:00 2001
> > >> >> From: Muhammad Faiz <mfcc64 at gmail.com>
> > >> >> Date: Wed, 17 Feb 2016 21:21:12 +0700
> > >> >> Subject: [PATCH] avfilter/src_movie: add various commands
> > >> >>
> > >> >> add seek command
> > >> >> add get_duration command
> > >> >> ---
> > >> >> doc/filters.texi | 24 ++++++++++++++++++++++++
> > >> >> libavfilter/src_movie.c | 37 +++++++++++++++++++++++++++++++++++++
> > >> >> 2 files changed, 61 insertions(+)
> > >> >>
> > >> >
> > >> >> +static int process_command(AVFilterContext *ctx, const char *cmd, const char *args,
> > >> >> + char *res, int res_len, int flags)
> > >> >> +{
> > >> >> + MovieContext *movie = ctx->priv;
> > >> >> + int ret = AVERROR(ENOSYS);
> > >> >> +
> > >> >> + if (!strcmp(cmd, "seek")) {
> > >> >> + int idx, flags;
> > >> >> + int64_t ts;
> > >> >> + char tail[2];
> > >> >> +
> > >> >> + if (sscanf(args, "%i|%"SCNi64"|%i %1s", &idx, &ts, &flags, tail) != 3)
> > >> >> + return AVERROR(EINVAL);
> > >> >> +
> > >> >> + return av_seek_frame(movie->format_ctx, idx, ts, flags);
> > >> >
> > >> > This can't work correctly. You have to flush the decoder (which you
> > >> > could easily do, but fail to do here), and the filters (which you can't
> > >> > do unless you add seeking and/or flushing support to libavfilter).
> > >> I don't see avformat_flush or avio_flush call on ffplay
> > >
> > > No, the decoders.
> > >
> >
> > OK, I fix it in new patch
> > patch attached
> >
> > Thank's
>
> > doc/filters.texi | 24 ++++++++++++++++++++++++
> > libavfilter/src_movie.c | 45 +++++++++++++++++++++++++++++++++++++++++++++
> > 2 files changed, 69 insertions(+)
> > 8291b4f7704071ee0a1065d9e1714a49811c7001 0001-avfilter-src_movie-add-various-commands.patch
> > From ad978fe2627961db167a33c7f30b5501872bb904 Mon Sep 17 00:00:00 2001
> > From: Muhammad Faiz <mfcc64 at gmail.com>
> > Date: Wed, 17 Feb 2016 23:20:08 +0700
> > Subject: [PATCH] avfilter/src_movie: add various commands
> >
> > add seek command
> > add get_duration command
>
> updated it to codecpar and applied
btw, fate tests for this would be welcome!
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
In a rich man's house there is no place to spit but his face.
-- Diogenes of Sinope
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20160525/412815a8/attachment.sig>
More information about the ffmpeg-devel
mailing list