From 075ca640225fac6ab7f144c6443fc0233886e8c9 Mon Sep 17 00:00:00 2001 From: Steve Baker Date: Fri, 7 Jun 2002 19:32:53 +0000 Subject: [PATCH] file is opened in ready->paused rather than null->ready. this makes it easier to set the location more than once Original commit message from CVS: file is opened in ready->paused rather than null->ready. this makes it easier to set the location more than once --- gst/elements/gstfilesrc.c | 11 ++++++----- plugins/elements/gstfilesrc.c | 11 ++++++----- 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/gst/elements/gstfilesrc.c b/gst/elements/gstfilesrc.c index cbd29a03df..3fc7b50571 100644 --- a/gst/elements/gstfilesrc.c +++ b/gst/elements/gstfilesrc.c @@ -644,19 +644,20 @@ gst_filesrc_change_state (GstElement *element) switch (GST_STATE_TRANSITION (element)) { case GST_STATE_NULL_TO_READY: + break; + case GST_STATE_READY_TO_NULL: + break; + case GST_STATE_READY_TO_PAUSED: if (!GST_FLAG_IS_SET (element, GST_FILESRC_OPEN)) { if (!gst_filesrc_open_file (GST_FILESRC (element))) return GST_STATE_FAILURE; } break; - case GST_STATE_READY_TO_NULL: + case GST_STATE_PAUSED_TO_READY: if (GST_FLAG_IS_SET (element, GST_FILESRC_OPEN)) gst_filesrc_close_file (GST_FILESRC (element)); - break; - case GST_STATE_READY_TO_PAUSED: - case GST_STATE_PAUSED_TO_READY: - src->curoffset = 0; src->seek_happened = TRUE; + break; default: break; } diff --git a/plugins/elements/gstfilesrc.c b/plugins/elements/gstfilesrc.c index cbd29a03df..3fc7b50571 100644 --- a/plugins/elements/gstfilesrc.c +++ b/plugins/elements/gstfilesrc.c @@ -644,19 +644,20 @@ gst_filesrc_change_state (GstElement *element) switch (GST_STATE_TRANSITION (element)) { case GST_STATE_NULL_TO_READY: + break; + case GST_STATE_READY_TO_NULL: + break; + case GST_STATE_READY_TO_PAUSED: if (!GST_FLAG_IS_SET (element, GST_FILESRC_OPEN)) { if (!gst_filesrc_open_file (GST_FILESRC (element))) return GST_STATE_FAILURE; } break; - case GST_STATE_READY_TO_NULL: + case GST_STATE_PAUSED_TO_READY: if (GST_FLAG_IS_SET (element, GST_FILESRC_OPEN)) gst_filesrc_close_file (GST_FILESRC (element)); - break; - case GST_STATE_READY_TO_PAUSED: - case GST_STATE_PAUSED_TO_READY: - src->curoffset = 0; src->seek_happened = TRUE; + break; default: break; }