Commit 075cf0a0 authored by Christophe Massiot's avatar Christophe Massiot

* modules/stream_out/switcher.c: Explicitly set the pixel format (this is

   due to a recent change of the default value in ffmpeg which used to be
   YUV 420P). Forward i_rate in case a transcode or display operation
   takes place after switcher.
parent 44481f31
......@@ -756,6 +756,7 @@ static mtime_t VideoCommand( sout_stream_t *p_stream, sout_stream_id_t *id )
| CODEC_FLAG_LOW_DELAY;
id->ff_enc_c->mb_decision = FF_MB_DECISION_SIMPLE;
id->ff_enc_c->pix_fmt = PIX_FMT_YUV420P;
if( avcodec_open( id->ff_enc_c, id->ff_enc ) )
{
......@@ -877,6 +878,7 @@ static block_t *VideoGetBuffer( sout_stream_t *p_stream, sout_stream_id_t *id,
p_out->i_length = p_buffer->i_length;
p_out->i_pts = p_buffer->i_dts;
p_out->i_dts = p_buffer->i_dts;
p_out->i_rate = p_buffer->i_rate;
switch ( id->ff_enc_c->coded_frame->pict_type )
{
......@@ -919,6 +921,7 @@ static block_t *AudioGetBuffer( sout_stream_t *p_stream, sout_stream_id_t *id,
p_out->i_length = p_buffer->i_length;
p_out->i_pts = p_buffer->i_dts;
p_out->i_dts = p_buffer->i_dts;
p_out->i_rate = p_buffer->i_rate;
block_Release( p_buffer );
......
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