[vlc-commits] input: Extract attachment also when preparsing

Hugo Beauzée-Luyssen git at videolan.org
Mon Dec 2 17:47:28 CET 2019


vlc | branch: master | Hugo Beauzée-Luyssen <hugo at beauzee.fr> | Fri Nov 29 15:41:08 2019 +0100| [ae3d241cec36f49ea25ceb112500421648bdfde3] | committer: Hugo Beauzée-Luyssen

input: Extract attachment also when preparsing

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=ae3d241cec36f49ea25ceb112500421648bdfde3
---

 src/input/input.c | 22 +++++++++++-----------
 1 file changed, 11 insertions(+), 11 deletions(-)

diff --git a/src/input/input.c b/src/input/input.c
index b8df8b6990..dd26edfd6b 100644
--- a/src/input/input.c
+++ b/src/input/input.c
@@ -2679,17 +2679,6 @@ static input_source_t *InputSourceNew( input_thread_t *p_input,
             in->b_title_demux = true;
         }
 
-        int i_attachment;
-        input_attachment_t **attachment;
-        if( !demux_Control( in->p_demux, DEMUX_GET_ATTACHMENTS,
-                             &attachment, &i_attachment ) )
-        {
-            vlc_mutex_lock( &input_priv(p_input)->p_item->lock );
-            AppendAttachment( &input_priv(p_input)->i_attachment, &input_priv(p_input)->attachment, &input_priv(p_input)->attachment_demux,
-                              i_attachment, attachment, in->p_demux );
-            vlc_mutex_unlock( &input_priv(p_input)->p_item->lock );
-        }
-
         demux_Control( in->p_demux, DEMUX_GET_PTS_DELAY, &in->i_pts_delay );
         if( in->i_pts_delay > INPUT_PTS_DELAY_MAX )
             in->i_pts_delay = INPUT_PTS_DELAY_MAX;
@@ -2697,6 +2686,17 @@ static input_source_t *InputSourceNew( input_thread_t *p_input,
             in->i_pts_delay = 0;
     }
 
+    int i_attachment;
+    input_attachment_t **attachment;
+    if( !demux_Control( in->p_demux, DEMUX_GET_ATTACHMENTS,
+                         &attachment, &i_attachment ) )
+    {
+        vlc_mutex_lock( &input_priv(p_input)->p_item->lock );
+        AppendAttachment( &input_priv(p_input)->i_attachment, &input_priv(p_input)->attachment, &input_priv(p_input)->attachment_demux,
+                          i_attachment, attachment, in->p_demux );
+        vlc_mutex_unlock( &input_priv(p_input)->p_item->lock );
+    }
+
     if( demux_Control( in->p_demux, DEMUX_GET_FPS, &in->f_fps ) )
         in->f_fps = 0.f;
 



More information about the vlc-commits mailing list