[vlc-commits] sout/es: query access_out before creating the muxer
Rémi Denis-Courmont
git at videolan.org
Sun Mar 1 12:53:16 CET 2020
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sun Mar 1 13:51:11 2020 +0200| [d956f560b74c1925cbe6c3ac20085b92c0d04078] | committer: Rémi Denis-Courmont
sout/es: query access_out before creating the muxer
The muxer takes ownership of the access output. Better be safe than
sorry and use the access output while we actually own it.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=d956f560b74c1925cbe6c3ac20085b92c0d04078
---
modules/stream_out/es.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/modules/stream_out/es.c b/modules/stream_out/es.c
index 64f6ae2849..b37737bf1a 100644
--- a/modules/stream_out/es.c
+++ b/modules/stream_out/es.c
@@ -351,6 +351,8 @@ static void *Add( sout_stream_t *p_stream, const es_format_t *p_fmt )
return( NULL );
}
+ bool pace_control = sout_AccessOutCanControlPace( p_access );
+
/* *** find and open appropriate mux module *** */
p_mux = sout_MuxNew( p_stream->p_sout, psz_mux, p_access );
if( p_mux == NULL )
@@ -384,7 +386,7 @@ static void *Add( sout_stream_t *p_stream, const es_format_t *p_fmt )
return NULL;
}
- if( !sout_AccessOutCanControlPace( p_access ) )
+ if( !pace_control )
p_stream->p_sout->i_out_pace_nocontrol++;
return id;
More information about the vlc-commits
mailing list