vlc | branch: master | Francois Cartegnie <[email protected]> | Mon Oct 14 
20:57:17 2019 +0200| [136fd86090b11ba6d89e46e16e8f7474d4451e2f] | committer: 
Francois Cartegnie

demux: avi: fix debug height for flipped planes (fix #22915)

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

 modules/demux/avi/avi.c    | 5 +++--
 modules/demux/avi/libavi.c | 3 ++-
 2 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/modules/demux/avi/avi.c b/modules/demux/avi/avi.c
index db4659a1b3..12e793a018 100644
--- a/modules/demux/avi/avi.c
+++ b/modules/demux/avi/avi.c
@@ -637,8 +637,9 @@ static int Open( vlc_object_t * p_this )
 
                 msg_Dbg( p_demux, "stream[%u] video(%4.4s) %"PRIu32"x%"PRIu32" 
%dbpp %ffps",
                          i, (char*)&p_vids->p_bih->biCompression,
-                         (uint32_t)p_vids->p_bih->biWidth,
-                         (uint32_t)p_vids->p_bih->biHeight,
+                         p_vids->p_bih->biWidth,
+                         (p_vids->p_bih->biHeight <= INT_MAX) ? 
p_vids->p_bih->biHeight
+                                                              : -1 * 
p_vids->p_bih->biHeight,
                          p_vids->p_bih->biBitCount,
                          (float)tk->i_rate/(float)tk->i_scale );
                 break;
diff --git a/modules/demux/avi/libavi.c b/modules/demux/avi/libavi.c
index ba35a3f88a..5a468facac 100644
--- a/modules/demux/avi/libavi.c
+++ b/modules/demux/avi/libavi.c
@@ -548,7 +548,8 @@ static int AVI_ChunkRead_strf( stream_t *s, avi_chunk_t 
*p_chk )
                      "strf: video:%4.4s %"PRIu32"x%"PRIu32" planes:%d %dbpp",
                      (char*)&p_chk->strf.vids.p_bih->biCompression,
                      (uint32_t)p_chk->strf.vids.p_bih->biWidth,
-                     (uint32_t)p_chk->strf.vids.p_bih->biHeight,
+                     p_chk->strf.vids.p_bih->biHeight <= INT32_MAX ? 
p_chk->strf.vids.p_bih->biHeight
+                                                                   : -1 * 
p_chk->strf.vids.p_bih->biHeight,
                      p_chk->strf.vids.p_bih->biPlanes,
                      p_chk->strf.vids.p_bih->biBitCount );
 #endif

_______________________________________________
vlc-commits mailing list
[email protected]
https://mailman.videolan.org/listinfo/vlc-commits

Reply via email to