mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-04-13 11:34:10 +00:00
Reset the offset when going to READY
Original commit message from CVS: Reset the offset when going to READY
This commit is contained in:
parent
741051f00d
commit
9a011a79c0
2 changed files with 8 additions and 2 deletions
|
@ -573,12 +573,15 @@ gst_filesrc_close_file (GstFileSrc *src)
|
|||
static GstElementStateReturn
|
||||
gst_filesrc_change_state (GstElement *element)
|
||||
{
|
||||
g_return_val_if_fail (GST_IS_FILESRC (element), GST_STATE_FAILURE);
|
||||
GstFileSrc *src = GST_FILESRC(element);
|
||||
|
||||
if (GST_STATE_PENDING (element) == GST_STATE_NULL) {
|
||||
if (GST_FLAG_IS_SET (element, GST_FILESRC_OPEN))
|
||||
gst_filesrc_close_file (GST_FILESRC (element));
|
||||
} if (GST_STATE_PENDING (element) == GST_STATE_READY) {
|
||||
src->curoffset = 0;
|
||||
} else {
|
||||
|
||||
if (!GST_FLAG_IS_SET (element, GST_FILESRC_OPEN)) {
|
||||
if (!gst_filesrc_open_file (GST_FILESRC (element)))
|
||||
return GST_STATE_FAILURE;
|
||||
|
|
|
@ -573,12 +573,15 @@ gst_filesrc_close_file (GstFileSrc *src)
|
|||
static GstElementStateReturn
|
||||
gst_filesrc_change_state (GstElement *element)
|
||||
{
|
||||
g_return_val_if_fail (GST_IS_FILESRC (element), GST_STATE_FAILURE);
|
||||
GstFileSrc *src = GST_FILESRC(element);
|
||||
|
||||
if (GST_STATE_PENDING (element) == GST_STATE_NULL) {
|
||||
if (GST_FLAG_IS_SET (element, GST_FILESRC_OPEN))
|
||||
gst_filesrc_close_file (GST_FILESRC (element));
|
||||
} if (GST_STATE_PENDING (element) == GST_STATE_READY) {
|
||||
src->curoffset = 0;
|
||||
} else {
|
||||
|
||||
if (!GST_FLAG_IS_SET (element, GST_FILESRC_OPEN)) {
|
||||
if (!gst_filesrc_open_file (GST_FILESRC (element)))
|
||||
return GST_STATE_FAILURE;
|
||||
|
|
Loading…
Reference in a new issue