[vlc-devel] [PATCH 24/25] sout: remove sout_stream_t.pf_flush

RĂ©mi Denis-Courmont remi at remlab.net
Sat Oct 10 18:09:35 CEST 2020


---
 include/vlc_sout.h                | 8 ++------
 src/stream_output/stream_output.c | 1 -
 2 files changed, 2 insertions(+), 7 deletions(-)

diff --git a/include/vlc_sout.h b/include/vlc_sout.h
index 4d9f8225eb..16130eedba 100644
--- a/include/vlc_sout.h
+++ b/include/vlc_sout.h
@@ -198,7 +198,6 @@ struct sout_stream_t
     /* manage a packet */
     int               (*pf_send)( sout_stream_t *, void *, block_t* );
     int               (*pf_control)( sout_stream_t *, int, va_list );
-    void              (*pf_flush)( sout_stream_t *, void * );
 
     void              *p_sys;
 };
@@ -236,12 +235,9 @@ static inline int sout_StreamIdSend( sout_stream_t *s,
 static inline void sout_StreamFlush( sout_stream_t *s,
                                      void *id )
 {
-    if (s->ops == NULL) {
-        if (s->pf_flush != NULL)
-            s->pf_flush(s, id);
+    if (s->ops == NULL)
         return;
-   }
-   if (s->ops->flush != NULL)
+    if (s->ops->flush != NULL)
         s->ops->flush(s, id);
 }
 
diff --git a/src/stream_output/stream_output.c b/src/stream_output/stream_output.c
index 08dd9ca086..af26d5aad3 100644
--- a/src/stream_output/stream_output.c
+++ b/src/stream_output/stream_output.c
@@ -802,7 +802,6 @@ static sout_stream_t *sout_StreamNew( vlc_object_t *parent, char *psz_name,
     p_stream->p_cfg    = p_cfg;
     p_stream->p_next   = p_next;
     p_stream->ops = NULL;
-    p_stream->pf_flush = NULL;
     p_stream->pf_control = NULL;
     p_stream->p_sys = NULL;
 
-- 
2.28.0



More information about the vlc-devel mailing list