[vlc-commits] demux: adaptative: recycle output on format change

Francois Cartegnie git at videolan.org
Wed Sep 23 21:15:09 CEST 2015


vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Wed Sep 23 13:05:19 2015 +0200| [656207acab2337bc88d9aa5e895795f6f98bced4] | committer: Francois Cartegnie

demux: adaptative: recycle output on format change

avoids dropping current command queue and not recycling
compatible es

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

 modules/demux/adaptative/Streams.cpp |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/modules/demux/adaptative/Streams.cpp b/modules/demux/adaptative/Streams.cpp
index ea373d5..88081d0 100644
--- a/modules/demux/adaptative/Streams.cpp
+++ b/modules/demux/adaptative/Streams.cpp
@@ -80,9 +80,9 @@ void Stream::updateFormat(StreamFormat &newformat)
     if( format == newformat && output )
         return;
 
-    delete output;
+    output = streamOutputFactory->create(p_demux, newformat, output);
+
     format = newformat;
-    output = streamOutputFactory->create(p_demux, format);
     if(!output)
         throw VLC_EGENERIC;
     output->setLanguage(language);



More information about the vlc-commits mailing list