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

Vittorio Giovara git at videolan.org
Fri Jul 19 12:53:25 CEST 2013


vlc/vlc-2.1 | branch: master | Vittorio Giovara <vittorio.giovara at gmail.com> | Mon Jul 15 18:00:27 2013 +0200| [b8e1de0ec245fcc4c912ff4ab152d3323da49b4f] | committer: Jean-Baptiste Kempf

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>
(cherry picked from commit b71c85b3d88b8d0ad2d4a63bf58ebcd2ad771cbf)
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

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

 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 07c785e..1183176 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