- if( (p_sys->i_width <= 0) && (p_sys->i_height > 0) )
- {
- p_sys->i_width = (p_pic->format.i_width * p_sys->i_height) / p_pic->format.i_height;
- }
- else if( (p_sys->i_height <= 0) && (p_sys->i_width > 0) )
- {
- p_sys->i_height = (p_pic->format.i_height * p_sys->i_width) / p_pic->format.i_width;
- }
- else if( (p_sys->i_width <= 0) && (p_sys->i_height <= 0) )
- {
- p_sys->i_width = p_pic->format.i_width;
- p_sys->i_height = p_pic->format.i_height;
- }
- p_sys->p_scene->p_pic = picture_New( p_pic->format.i_chroma,
- p_pic->format.i_width, p_pic->format.i_height,
- p_pic->format.i_sar_num );
- if( p_sys->p_scene->p_pic )
- {
- picture_Copy( p_sys->p_scene->p_pic, p_pic );
- SavePicture( p_filter, p_sys->p_scene->p_pic );
- }
+ p_sys->scene.p_pic = picture_NewFromFormat( &p_pic->format );
+ if( p_sys->scene.p_pic )
+ {
+ picture_Copy( p_sys->scene.p_pic, p_pic );
+ SavePicture( p_filter, p_sys->scene.p_pic );