From 64100e473754c70cfba76f1ba1ff7eb297c954db Mon Sep 17 00:00:00 2001 From: Carl-Anton Ingmarsson Date: Sun, 7 Jun 2009 01:25:01 +0200 Subject: vdpaumpegdec: send newsegment event if only the rate has been updated --- sys/vdpau/gstvdpmpegdec.c | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) (limited to 'sys') diff --git a/sys/vdpau/gstvdpmpegdec.c b/sys/vdpau/gstvdpmpegdec.c index 759eb7f9..931de5a4 100644 --- a/sys/vdpau/gstvdpmpegdec.c +++ b/sys/vdpau/gstvdpmpegdec.c @@ -825,7 +825,6 @@ normal_seek (GstVdpMpegDec * mpeg_dec, GstEvent * event) cur_type, time_cur, stop_type, time_stop, &update); if (update) { - /* seek on bytes */ conv = GST_FORMAT_BYTES; if (!gst_vdp_mpeg_dec_convert (mpeg_dec, GST_FORMAT_TIME, time_cur, @@ -850,8 +849,17 @@ normal_seek (GstVdpMpegDec * mpeg_dec, GstEvent * event) g_mutex_unlock (mpeg_dec->mutex); - } else - res = FALSE; + } else { + GstEvent *event; + + /* send segment with new rate */ + event = gst_event_new_new_segment (TRUE, + mpeg_dec->segment.rate, GST_FORMAT_TIME, mpeg_dec->segment.start, + mpeg_dec->segment.stop, mpeg_dec->segment.time); + + gst_pad_push_event (mpeg_dec->src, event); + res = TRUE; + } return res; -- cgit v1.2.1