Commit ac2886e6 authored by Steve Lhomme's avatar Steve Lhomme Committed by Jean-Baptiste Kempf

rawvideo: only copy the input es_format_t on output for the decoder

It's automatically done for packetizers.
Signed-off-by: Jean-Baptiste Kempf's avatarJean-Baptiste Kempf <jb@videolan.org>
parent cdf2f061
......@@ -76,7 +76,7 @@ vlc_module_end ()
/**
* Common initialization for decoder and packetizer
*/
static int OpenCommon( decoder_t *p_dec )
static int OpenCommon( decoder_t *p_dec, bool b_packetizer )
{
const vlc_chroma_description_t *dsc =
vlc_fourcc_GetChromaDescription( p_dec->fmt_in.i_codec );
......@@ -100,7 +100,8 @@ static int OpenCommon( decoder_t *p_dec )
if( !p_dec->fmt_in.video.i_visible_height )
p_dec->fmt_in.video.i_visible_height = p_dec->fmt_in.video.i_height;
es_format_Copy( &p_dec->fmt_out, &p_dec->fmt_in );
if ( !b_packetizer )
es_format_Copy( &p_dec->fmt_out, &p_dec->fmt_in );
date_Init( &p_sys->pts, p_dec->fmt_out.video.i_frame_rate,
p_dec->fmt_out.video.i_frame_rate_base );
......@@ -267,7 +268,7 @@ static int OpenDecoder( vlc_object_t *p_this )
{
decoder_t *p_dec = (decoder_t *)p_this;
int ret = OpenCommon( p_dec );
int ret = OpenCommon( p_dec, false );
if( ret == VLC_SUCCESS )
{
p_dec->pf_decode = DecodeFrame;
......@@ -305,7 +306,7 @@ static int OpenPacketizer( vlc_object_t *p_this )
{
decoder_t *p_dec = (decoder_t *)p_this;
int ret = OpenCommon( p_dec );
int ret = OpenCommon( p_dec, true );
if( ret == VLC_SUCCESS )
p_dec->pf_packetize = SendFrame;
return ret;
......
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