[vlc-commits] rawvideo: deal with visible width/height (refs #8802)
Rémi Denis-Courmont
git at videolan.org
Sun Jun 16 17:43:42 CEST 2013
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sun Jun 16 18:40:44 2013 +0300| [0f21811dc2c3c168e1193c0476ce55a1e099efe7] | committer: Rémi Denis-Courmont
rawvideo: deal with visible width/height (refs #8802)
So far rawvideo assumed that the full pitch was part of the picture.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=0f21811dc2c3c168e1193c0476ce55a1e099efe7
---
modules/codec/rawvideo.c | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)
diff --git a/modules/codec/rawvideo.c b/modules/codec/rawvideo.c
index 3cd8719..f2db545 100644
--- a/modules/codec/rawvideo.c
+++ b/modules/codec/rawvideo.c
@@ -146,8 +146,13 @@ static int OpenDecoder( vlc_object_t *p_this )
(unsigned int)(-(int)p_dec->fmt_in.video.i_height);
p_sys->b_invert = true;
}
+ if( !p_dec->fmt_in.video.i_visible_width )
+ p_dec->fmt_in.video.i_visible_width = p_dec->fmt_in.video.i_width;
+ if( !p_dec->fmt_in.video.i_visible_height )
+ p_dec->fmt_in.video.i_visible_height = p_dec->fmt_in.video.i_height;
- if( p_dec->fmt_in.video.i_width <= 0 || p_dec->fmt_in.video.i_height <= 0 )
+ if( p_dec->fmt_in.video.i_visible_width <= 0
+ || p_dec->fmt_in.video.i_visible_height <= 0 )
{
msg_Err( p_dec, "invalid display size %dx%d",
p_dec->fmt_in.video.i_width, p_dec->fmt_in.video.i_height );
@@ -169,8 +174,8 @@ static int OpenDecoder( vlc_object_t *p_this )
/* Find out p_vdec->i_raw_size */
video_format_Setup( &p_dec->fmt_out.video, p_dec->fmt_in.i_codec,
- p_dec->fmt_in.video.i_width,
- p_dec->fmt_in.video.i_height,
+ p_dec->fmt_in.video.i_visible_width,
+ p_dec->fmt_in.video.i_visible_height,
p_dec->fmt_in.video.i_sar_num,
p_dec->fmt_in.video.i_sar_den );
picture_t picture;
More information about the vlc-commits
mailing list