Commit 3c9f7013 authored by Jean-Paul Saman's avatar Jean-Paul Saman

Backport [23204] and [23274] for building 0.8.6-bugfix branch with newer ffmpeg.

parent c129ad42
......@@ -132,8 +132,11 @@ int E_(OpenMux)( vlc_object_t *p_this )
free( p_sys );
return VLC_EGENERIC;
}
#if LIBAVFORMAT_VERSION_INT >= ((52<<16)+(0<<8)+0)
p_sys->oc->pb = &p_sys->io;
#else
p_sys->oc->pb = p_sys->io;
#endif
p_sys->oc->nb_streams = 0;
p_sys->b_write_header = VLC_TRUE;
......@@ -348,14 +351,19 @@ static int Mux( sout_mux_t *p_mux )
{
msg_Dbg( p_mux, "writing header" );
p_sys->b_write_header = VLC_FALSE;
if( av_write_header( p_sys->oc ) < 0 )
{
msg_Err( p_mux, "could not write header" );
p_sys->b_write_header = VLC_FALSE;
p_sys->b_error = VLC_TRUE;
return VLC_EGENERIC;
}
#if LIBAVFORMAT_VERSION_INT >= ((52<<16)+(0<<8)+0)
put_flush_packet( p_sys->oc->pb );
#else
put_flush_packet( &p_sys->oc->pb );
#endif
p_sys->b_write_header = VLC_FALSE;
}
for( ;; )
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment