From f6dad2e86858b62388c7bc2a76c329273d91ec71 Mon Sep 17 00:00:00 2001 From: Stefan Kost <ensonic@users.sf.net> Date: Tue, 18 Jan 2011 10:20:29 +0200 Subject: [PATCH] snapshot: use a keyframe seek One would usualy get good quality snapshots quickly. The exact seek position does not really matter. --- tests/examples/snapshot/snapshot.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/examples/snapshot/snapshot.c b/tests/examples/snapshot/snapshot.c index 335c836b88..14f28093e4 100644 --- a/tests/examples/snapshot/snapshot.c +++ b/tests/examples/snapshot/snapshot.c @@ -99,8 +99,8 @@ main (int argc, char *argv[]) * by seeking to somewhere else we have a bigger chance of getting something * more interesting. An optimisation would be to detect black images and then * seek a little more */ - gst_element_seek_simple (pipeline, GST_FORMAT_TIME, GST_SEEK_FLAG_FLUSH, - position); + gst_element_seek_simple (pipeline, GST_FORMAT_TIME, + GST_SEEK_FLAG_KEY_UNIT | GST_SEEK_FLAG_FLUSH, position); /* get the preroll buffer from appsink, this block untils appsink really * prerolls */