Commit 932f2030 authored by Laurent Aimar's avatar Laurent Aimar

Fixed raw picture size in rawvideo codec.

parent 2915b611
......@@ -165,8 +165,14 @@ static int OpenDecoder( vlc_object_t *p_this )
p_dec->fmt_in.video.i_height,
p_dec->fmt_in.video.i_sar_num,
p_dec->fmt_in.video.i_sar_den );
p_sys->i_raw_size = p_dec->fmt_out.video.i_bits_per_pixel *
p_dec->fmt_out.video.i_width * p_dec->fmt_out.video.i_height / 8;
picture_t picture;
picture_Setup( &picture, p_dec->fmt_out.i_codec,
p_dec->fmt_in.video.i_width,
p_dec->fmt_in.video.i_height, 0, 1 );
p_sys->i_raw_size = 0;
for( int i = 0; i < picture.i_planes; i++ )
p_sys->i_raw_size += picture.p[i].i_visible_pitch *
picture.p[i].i_visible_lines;
if( !p_dec->fmt_in.video.i_sar_num || !p_dec->fmt_in.video.i_sar_den )
{
......
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