[vlc-devel] [PATCH 1/9] core: force the output to b_packetized when a packetizer is opened successfully

Steve Lhomme robux4 at videolabs.io
Wed Jul 12 16:54:04 CEST 2017


---
 src/input/decoder.c | 7 +++++--
 src/input/demux.c   | 2 ++
 2 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/src/input/decoder.c b/src/input/decoder.c
index b292658b38..5a976bf111 100644
--- a/src/input/decoder.c
+++ b/src/input/decoder.c
@@ -187,8 +187,9 @@ static int LoadDecoder( decoder_t *p_dec, bool b_packetizer,
         es_format_Clean( &p_dec->fmt_in );
         return -1;
     }
-    else
-        return 0;
+    if (b_packetizer)
+        p_dec->fmt_out.b_packetized = true;
+    return 0;
 }
 
 /**
@@ -1916,6 +1917,8 @@ static decoder_t *decoder_New( vlc_object_t *p_parent, input_thread_t *p_input,
         return NULL;
     }
 
+    if ( p_sout != NULL )
+        p_dec->fmt_out.b_packetized = true;
     p_dec->p_owner->p_clock = p_clock;
     assert( p_dec->fmt_out.i_cat != UNKNOWN_ES );
 
diff --git a/src/input/demux.c b/src/input/demux.c
index 109a386775..f1c6657799 100644
--- a/src/input/demux.c
+++ b/src/input/demux.c
@@ -530,6 +530,8 @@ decoder_t *demux_PacketizerNew( demux_t *p_demux, es_format_t *p_fmt, const char
         return NULL;
     }
 
+    p_packetizer->fmt_out.b_packetized = true;
+
     return p_packetizer;
 }
 
-- 
2.12.1



More information about the vlc-devel mailing list