Commit 24c96490 authored by Laurent Aimar's avatar Laurent Aimar

Used picture_NewFromFormat when appropriate.

parent 7d0e62b8
...@@ -504,9 +504,7 @@ static picture_t *VideoBufferNew( filter_t *p_filter ) ...@@ -504,9 +504,7 @@ static picture_t *VideoBufferNew( filter_t *p_filter )
{ {
const video_format_t *p_fmt = &p_filter->fmt_out.video; const video_format_t *p_fmt = &p_filter->fmt_out.video;
picture_t *p_picture = picture_New( p_fmt->i_chroma, picture_t *p_picture = picture_NewFromFormat( p_fmt );
p_fmt->i_width, p_fmt->i_height,
p_fmt->i_aspect );
if( !p_picture ) if( !p_picture )
msg_Err( p_filter, "Failed to allocate picture" ); msg_Err( p_filter, "Failed to allocate picture" );
return p_picture; return p_picture;
......
...@@ -616,10 +616,7 @@ vlc_fourcc_t image_Mime2Fourcc( const char *psz_mime ) ...@@ -616,10 +616,7 @@ vlc_fourcc_t image_Mime2Fourcc( const char *psz_mime )
static picture_t *video_new_buffer( decoder_t *p_dec ) static picture_t *video_new_buffer( decoder_t *p_dec )
{ {
p_dec->fmt_out.video.i_chroma = p_dec->fmt_out.i_codec; p_dec->fmt_out.video.i_chroma = p_dec->fmt_out.i_codec;
return picture_New( p_dec->fmt_out.video.i_chroma, return picture_NewFromFormat( &p_dec->fmt_out.video );
p_dec->fmt_out.video.i_width,
p_dec->fmt_out.video.i_height,
p_dec->fmt_out.video.i_aspect );
} }
static void video_del_buffer( decoder_t *p_dec, picture_t *p_pic ) static void video_del_buffer( decoder_t *p_dec, picture_t *p_pic )
......
...@@ -822,8 +822,7 @@ subpicture_region_t *subpicture_region_New( const video_format_t *p_fmt ) ...@@ -822,8 +822,7 @@ subpicture_region_t *subpicture_region_New( const video_format_t *p_fmt )
if( p_fmt->i_chroma == VLC_CODEC_TEXT ) if( p_fmt->i_chroma == VLC_CODEC_TEXT )
return p_region; return p_region;
p_region->p_picture = picture_New( p_fmt->i_chroma, p_fmt->i_width, p_fmt->i_height, p_region->p_picture = picture_NewFromFormat( p_fmt );
p_fmt->i_aspect );
if( !p_region->p_picture ) if( !p_region->p_picture )
{ {
free( p_fmt->p_palette ); free( p_fmt->p_palette );
...@@ -1871,8 +1870,7 @@ static picture_t *spu_new_video_buffer( filter_t *p_filter ) ...@@ -1871,8 +1870,7 @@ static picture_t *spu_new_video_buffer( filter_t *p_filter )
const video_format_t *p_fmt = &p_filter->fmt_out.video; const video_format_t *p_fmt = &p_filter->fmt_out.video;
VLC_UNUSED(p_filter); VLC_UNUSED(p_filter);
return picture_New( p_fmt->i_chroma, return picture_NewFromFormat( p_fmt );
p_fmt->i_width, p_fmt->i_height, p_fmt->i_aspect );
} }
static void spu_del_video_buffer( filter_t *p_filter, picture_t *p_picture ) static void spu_del_video_buffer( filter_t *p_filter, picture_t *p_picture )
{ {
......
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