[vlc-commits] fix video playback when width and height differ from coded_width and coded_height

Vittorio Giovara git at videolan.org
Tue Jul 16 19:05:35 CEST 2013


vlc | branch: master | Vittorio Giovara <vittorio.giovara at gmail.com> | Mon Jul 15 18:00:27 2013 +0200| [b71c85b3d88b8d0ad2d4a63bf58ebcd2ad771cbf] | committer: Rémi Denis-Courmont

fix video playback when width and height differ from coded_width and coded_height

Signed-off-by: Rémi Denis-Courmont <remi at remlab.net>

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=b71c85b3d88b8d0ad2d4a63bf58ebcd2ad771cbf
---

 modules/codec/avcodec/video.c |   10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/modules/codec/avcodec/video.c b/modules/codec/avcodec/video.c
index a6a9ab7..50d0a82 100644
--- a/modules/codec/avcodec/video.c
+++ b/modules/codec/avcodec/video.c
@@ -125,8 +125,14 @@ static inline picture_t *ffmpeg_NewPictBuf( decoder_t *p_dec,
 {
     decoder_sys_t *p_sys = p_dec->p_sys;
 
-    p_dec->fmt_out.video.i_width = p_context->width;
-    p_dec->fmt_out.video.i_height = p_context->height;
+    if( p_context->coded_width != p_context->width ||
+        p_context->coded_height != p_context->height )
+    {
+        p_dec->fmt_out.video.i_visible_width = p_context->width;
+        p_dec->fmt_out.video.i_visible_height = p_context->height;
+    }
+    p_dec->fmt_out.video.i_width = p_context->coded_width;
+    p_dec->fmt_out.video.i_height = p_context->coded_height;
 
     if( !p_context->width || !p_context->height )
     {



More information about the vlc-commits mailing list