Zebediah Figura : winegstreamer: Move the "push_thread" field to struct wg_parser.

Alexandre Julliard julliard at winehq.org
Tue Feb 2 15:52:08 CST 2021


Module: wine
Branch: master
Commit: 8a15c811ba8aac2e28e60a15d02f73001bf0f5de
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=8a15c811ba8aac2e28e60a15d02f73001bf0f5de

Author: Zebediah Figura <z.figura12 at gmail.com>
Date:   Mon Feb  1 18:36:56 2021 -0600

winegstreamer: Move the "push_thread" field to struct wg_parser.

Signed-off-by: Zebediah Figura <z.figura12 at gmail.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/winegstreamer/gstdemux.c | 18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)

diff --git a/dlls/winegstreamer/gstdemux.c b/dlls/winegstreamer/gstdemux.c
index 734984d7fed..21d6e324add 100644
--- a/dlls/winegstreamer/gstdemux.c
+++ b/dlls/winegstreamer/gstdemux.c
@@ -53,6 +53,8 @@ struct wg_parser
     GstPad *my_src, *their_sink;
 
     guint64 file_size, start_offset, next_offset, stop_offset;
+
+    pthread_t push_thread;
 };
 
 struct parser
@@ -82,8 +84,6 @@ struct parser
     pthread_cond_t init_cond;
     bool no_more_pads, has_duration, error;
 
-    pthread_t push_thread;
-
     HANDLE read_thread;
     pthread_cond_t read_cond, read_done_cond;
     struct
@@ -635,7 +635,7 @@ static gboolean gst_base_src_perform_seek(struct parser *This, GstEvent *event)
     gboolean flush;
     guint32 seqnum;
     GstEvent *tevent;
-    BOOL thread = !!This->push_thread;
+    BOOL thread = !!parser->push_thread;
 
     gst_event_parse_seek(event, &rate, &seek_format, &flags,
                          &cur_type, &cur, &stop_type, &stop);
@@ -1436,19 +1436,19 @@ static gboolean activate_push(GstPad *pad, gboolean activate)
     struct wg_parser *parser = This->wg_parser;
 
     if (!activate) {
-        if (This->push_thread) {
-            pthread_join(This->push_thread, NULL);
-            This->push_thread = 0;
+        if (parser->push_thread) {
+            pthread_join(parser->push_thread, NULL);
+            parser->push_thread = 0;
         }
         if (This->filter.state == State_Stopped)
             parser->next_offset = parser->start_offset;
-    } else if (!This->push_thread) {
+    } else if (!parser->push_thread) {
         int ret;
 
-        if ((ret = pthread_create(&This->push_thread, NULL, push_data, This)))
+        if ((ret = pthread_create(&parser->push_thread, NULL, push_data, This)))
         {
             GST_ERROR("Failed to create push thread: %s", strerror(errno));
-            This->push_thread = 0;
+            parser->push_thread = 0;
             return FALSE;
         }
     }




More information about the wine-cvs mailing list