]> git.sesse.net Git - vlc/blobdiff - modules/demux/avformat/mux.c
avformat mux: Propagate seekable status into avformat.
[vlc] / modules / demux / avformat / mux.c
index 97f5fb37d87075cb0c925534d4ea6a806c3711f3..990489cc13717f628c246858e5757d8bf8641365 100644 (file)
@@ -118,9 +118,12 @@ int OpenMux( vlc_object_t *p_this )
     p_sys->io_buffer_size = 32768;  /* FIXME */
     p_sys->io_buffer = malloc( p_sys->io_buffer_size );
 
+    bool b_can_seek;
+    if( sout_AccessOutControl( p_mux->p_access, ACCESS_OUT_CAN_SEEK, &b_can_seek ) )
+        b_can_seek = false;
     p_sys->io = avio_alloc_context(
         p_sys->io_buffer, p_sys->io_buffer_size,
-        1, p_mux, NULL, IOWrite, IOSeek );
+        1, p_mux, NULL, IOWrite, b_can_seek ? IOSeek : NULL );
 
     p_sys->oc->pb = p_sys->io;
     p_sys->oc->nb_streams = 0;