mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-23 18:21:04 +00:00
gst/rtsp/gstrtspsrc.c: Only pause/play in the seek handler when the source was playing.
Original commit message from CVS: * gst/rtsp/gstrtspsrc.c: (gst_rtspsrc_do_seek), (gst_rtspsrc_perform_seek): Only pause/play in the seek handler when the source was playing. Fixes #529379.
This commit is contained in:
parent
320e96a27c
commit
8a2bcfecb0
2 changed files with 18 additions and 6 deletions
|
@ -1,3 +1,10 @@
|
||||||
|
2008-11-11 Wim Taymans <wim.taymans@collabora.co.uk>
|
||||||
|
|
||||||
|
* gst/rtsp/gstrtspsrc.c: (gst_rtspsrc_do_seek),
|
||||||
|
(gst_rtspsrc_perform_seek):
|
||||||
|
Only pause/play in the seek handler when the source was playing.
|
||||||
|
Fixes #529379.
|
||||||
|
|
||||||
2008-11-11 Sebastian Dröge <slomo@circular-chaos.org>
|
2008-11-11 Sebastian Dröge <slomo@circular-chaos.org>
|
||||||
|
|
||||||
* gst/matroska/matroska-mux.c:
|
* gst/matroska/matroska-mux.c:
|
||||||
|
|
|
@ -1233,15 +1233,11 @@ gst_rtspsrc_connection_receive (GstRTSPSrc * src, GstRTSPMessage * message,
|
||||||
static gboolean
|
static gboolean
|
||||||
gst_rtspsrc_do_seek (GstRTSPSrc * src, GstSegment * segment)
|
gst_rtspsrc_do_seek (GstRTSPSrc * src, GstSegment * segment)
|
||||||
{
|
{
|
||||||
gboolean res;
|
|
||||||
|
|
||||||
src->state = GST_RTSP_STATE_SEEKING;
|
src->state = GST_RTSP_STATE_SEEKING;
|
||||||
/* PLAY will add the range header now. */
|
/* PLAY will add the range header now. */
|
||||||
src->need_range = TRUE;
|
src->need_range = TRUE;
|
||||||
|
|
||||||
res = gst_rtspsrc_play (src, segment);
|
return TRUE;
|
||||||
|
|
||||||
return res;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
|
@ -1255,6 +1251,7 @@ gst_rtspsrc_perform_seek (GstRTSPSrc * src, GstEvent * event)
|
||||||
gint64 cur, stop;
|
gint64 cur, stop;
|
||||||
gboolean flush;
|
gboolean flush;
|
||||||
gboolean update;
|
gboolean update;
|
||||||
|
gboolean playing;
|
||||||
GstSegment seeksegment = { 0, };
|
GstSegment seeksegment = { 0, };
|
||||||
|
|
||||||
if (event) {
|
if (event) {
|
||||||
|
@ -1321,10 +1318,18 @@ gst_rtspsrc_perform_seek (GstRTSPSrc * src, GstEvent * event)
|
||||||
if ((stop = seeksegment.stop) == -1)
|
if ((stop = seeksegment.stop) == -1)
|
||||||
stop = seeksegment.duration;
|
stop = seeksegment.duration;
|
||||||
|
|
||||||
gst_rtspsrc_pause (src);
|
playing = (src->state == GST_RTSP_STATE_PLAYING);
|
||||||
|
|
||||||
|
/* if we were playing, pause first */
|
||||||
|
if (playing)
|
||||||
|
gst_rtspsrc_pause (src);
|
||||||
|
|
||||||
res = gst_rtspsrc_do_seek (src, &seeksegment);
|
res = gst_rtspsrc_do_seek (src, &seeksegment);
|
||||||
|
|
||||||
|
/* and continue playing */
|
||||||
|
if (playing)
|
||||||
|
res = gst_rtspsrc_play (src, &seeksegment);
|
||||||
|
|
||||||
/* prepare for streaming again */
|
/* prepare for streaming again */
|
||||||
if (flush) {
|
if (flush) {
|
||||||
/* if we started flush, we stop now */
|
/* if we started flush, we stop now */
|
||||||
|
|
Loading…
Reference in a new issue