[gegl] ff-load: reduce amount of heuristics for delay in frame seeking
- From: Øyvind Kolås <ok src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gegl] ff-load: reduce amount of heuristics for delay in frame seeking
- Date: Wed, 25 Nov 2015 15:50:01 +0000 (UTC)
commit c5cf3f037a5549120f991e766923c9c9e0959935
Author: Øyvind Kolås <pippin gimp org>
Date: Wed Nov 25 16:46:40 2015 +0100
ff-load: reduce amount of heuristics for delay in frame seeking
operations/external/ff-load.c | 27 +++++++++++----------------
1 files changed, 11 insertions(+), 16 deletions(-)
---
diff --git a/operations/external/ff-load.c b/operations/external/ff-load.c
index eda71d7..c62993d 100644
--- a/operations/external/ff-load.c
+++ b/operations/external/ff-load.c
@@ -539,25 +539,20 @@ prepare (GeglOperation *operation)
fprintf (stdout, "duration: %02i:%02i:%02i\n", h, m, s);
}
#endif
- }
- /* is there a way to compute this from internals
- */
- if (!strcmp (o->video_codec, "mpeg1video"))
- p->codec_delay = 1;
- else if (!strcmp (o->video_codec, "mpeg4"))
- p->codec_delay = 2;
- else if (!strcmp (o->video_codec, "vp9"))
- p->codec_delay = 2;
- else if (!strcmp (o->video_codec, "theora"))
- p->codec_delay = 2;
- else if (!strcmp (o->video_codec, "h264"))
- p->codec_delay = 0;
- else
+ p->codec_delay = p->video_stream->codec->delay;
+
+ if (!strcmp (o->video_codec, "mpeg1video"))
+ p->codec_delay = 1;
+ else if (!strcmp (o->video_codec, "h264"))
{
- p->codec_delay = 0;
- fprintf (stderr, "[assuming no codec_delay for: %s]", o->video_codec);
+ if (strstr (p->video_fcontext->filename, ".mp4") ||
+ strstr (p->video_fcontext->filename, ".MP4")) /* XXX: too hacky, isn't there an avformat thing
to use? */
+ p->codec_delay = 3;
+ else
+ p->codec_delay = 0;
}
+ }
}
static GeglRectangle
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]