Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
gst-plugins-base
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
625
Issues
625
List
Boards
Labels
Service Desk
Milestones
Merge Requests
101
Merge Requests
101
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
GStreamer
gst-plugins-base
Commits
dc969bf5
Commit
dc969bf5
authored
Jan 07, 2021
by
Thibault Saunier
🌵
Committed by
GStreamer Merge Bot
Jan 08, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
giosrc: Ensure that an error is posted when underlying file is deleted
Part-of: <
!1001
>
parent
2d198ff1
Pipeline
#252941
waiting for manual action with stages
in 39 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
0 deletions
+24
-0
gst/gio/gstgiosrc.c
gst/gio/gstgiosrc.c
+24
-0
No files found.
gst/gio/gstgiosrc.c
View file @
dc969bf5
...
...
@@ -105,6 +105,25 @@ static GInputStream *gst_gio_src_get_stream (GstGioBaseSrc * bsrc);
static
gboolean
gst_gio_src_query
(
GstBaseSrc
*
base_src
,
GstQuery
*
query
);
static
gboolean
gst_gio_src_check_deleted
(
GstGioSrc
*
src
)
{
GstGioBaseSrc
*
bsrc
=
GST_GIO_BASE_SRC
(
src
);
if
(
!
g_file_query_exists
(
src
->
file
,
bsrc
->
cancel
))
{
gchar
*
uri
=
g_file_get_uri
(
src
->
file
);
GST_ELEMENT_ERROR
(
src
,
RESOURCE
,
NOT_FOUND
,
(
NULL
),
(
"The underlying file %s is not available anymore"
,
uri
));
g_free
(
uri
);
return
TRUE
;
}
return
FALSE
;
}
static
void
gst_gio_src_file_changed_cb
(
GstGioSrc
*
src
)
{
...
...
@@ -114,6 +133,8 @@ gst_gio_src_file_changed_cb (GstGioSrc * src)
if
(
src
->
monitoring_mainloop
)
g_main_loop_quit
(
src
->
monitoring_mainloop
);
GST_OBJECT_UNLOCK
(
src
);
gst_gio_src_check_deleted
(
src
);
}
static
void
...
...
@@ -133,6 +154,9 @@ gst_gio_src_wait_for_data (GstGioBaseSrc * bsrc)
g_return_val_if_fail
(
!
src
->
monitor
,
FALSE
);
if
(
gst_gio_src_check_deleted
(
src
))
return
FALSE
;
GST_OBJECT_LOCK
(
src
);
if
(
!
src
->
is_growing
)
{
GST_OBJECT_UNLOCK
(
src
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment