Skip to content

Commit

Permalink
ff-load: reduce amount of heuristics for delay in frame seeking
Browse files Browse the repository at this point in the history
  • Loading branch information
hodefoting committed Nov 25, 2015
1 parent 3c93875 commit c5cf3f0
Showing 1 changed file with 11 additions and 16 deletions.
27 changes: 11 additions & 16 deletions operations/external/ff-load.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit c5cf3f0

Please sign in to comment.