free( p_sys );
return VLC_EGENERIC;
}
+ if( p_sys->ctx ) sws_freeContext( p_sys->ctx );
+ p_sys->ctx = NULL;
msg_Dbg( p_filter, "%ix%i chroma: %4.4s -> %ix%i chroma: %4.4s",
p_filter->fmt_in.video.i_width, p_filter->fmt_in.video.i_height,
if( ( p_filter->fmt_in.video.i_width != p_sys->fmt_in.video.i_width ) ||
( p_filter->fmt_in.video.i_height != p_sys->fmt_in.video.i_height ) ||
( p_filter->fmt_out.video.i_width != p_sys->fmt_out.video.i_width ) ||
- ( p_filter->fmt_out.video.i_height != p_sys->fmt_out.video.i_height ) )
+ ( p_filter->fmt_out.video.i_height != p_sys->fmt_out.video.i_height ) ||
+ !p_sys->ctx )
{
int i_fmt_in, i_fmt_out;
dst, dst_stride );
#endif
- p_pic_dst->date = p_pic->date;
- p_pic_dst->b_force = p_pic->b_force;
- p_pic_dst->i_nb_fields = p_pic->i_nb_fields;
- p_pic_dst->b_progressive = p_pic->b_progressive;
- p_pic_dst->b_top_field_first = p_pic->b_top_field_first;
-
- if( p_pic->pf_release )
- p_pic->pf_release( p_pic );
+ picture_CopyProperties( p_pic_dst, p_pic );
+ picture_Release( p_pic );
return p_pic_dst;
}