[haiku-commits] haiku: hrev51193 - in src: add-ons/media/plugins/ffmpeg apps/mediaplayer/supplier

  • From: pulkomandy@xxxxxxxxxxxxx
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Tue, 30 May 2017 21:55:53 +0200 (CEST)

hrev51193 adds 2 changesets to branch 'master'
old head: 15afaf0bccce20ce19242f483d8145c8bd3d632c
new head: 4edf3ea9c1fd8f6903f40763c5c5dd67c1a701c5
overview: 
http://cgit.haiku-os.org/haiku/log/?qt=range&q=4edf3ea9c1fd+%5E15afaf0bccce

----------------------------------------------------------------------------

50f36c92b55e: MediaPlayer: fix a memory leak in SRT character set decoding

4edf3ea9c1fd: ffmpeg: Fix decoding of GBRP colorspace
  
  It turns out the first plane is blue, not green. Yes, this does not
  match with the colorspace name...

                             [ Adrien Destugues <pulkomandy@xxxxxxxxxxxxx> ]

----------------------------------------------------------------------------

2 files changed, 6 insertions(+), 4 deletions(-)
src/add-ons/media/plugins/ffmpeg/gfx_conv_c.cpp | 8 ++++----
src/apps/mediaplayer/supplier/SubTitlesSRT.cpp  | 2 ++

############################################################################

Commit:      50f36c92b55e2c3143271ff65e38c7edacff6c8a
URL:         http://cgit.haiku-os.org/haiku/commit/?id=50f36c92b55e
Author:      Adrien Destugues <pulkomandy@xxxxxxxxxxxxx>
Date:        Tue May 30 18:41:03 2017 UTC

MediaPlayer: fix a memory leak in SRT character set decoding

----------------------------------------------------------------------------

diff --git a/src/apps/mediaplayer/supplier/SubTitlesSRT.cpp 
b/src/apps/mediaplayer/supplier/SubTitlesSRT.cpp
index 8186de9..bce8f70 100644
--- a/src/apps/mediaplayer/supplier/SubTitlesSRT.cpp
+++ b/src/apps/mediaplayer/supplier/SubTitlesSRT.cpp
@@ -145,6 +145,8 @@ SubTitlesSRT::SubTitlesSRT(BFile* file, const char* name)
                line.SetTo("");
                currentLine++;
        }
+
+       delete decoder;
 }
 
 

############################################################################

Revision:    hrev51193
Commit:      4edf3ea9c1fd8f6903f40763c5c5dd67c1a701c5
URL:         http://cgit.haiku-os.org/haiku/commit/?id=4edf3ea9c1fd
Author:      Adrien Destugues <pulkomandy@xxxxxxxxxxxxx>
Date:        Tue May 30 19:55:02 2017 UTC

ffmpeg: Fix decoding of GBRP colorspace

It turns out the first plane is blue, not green. Yes, this does not
match with the colorspace name...

----------------------------------------------------------------------------

diff --git a/src/add-ons/media/plugins/ffmpeg/gfx_conv_c.cpp 
b/src/add-ons/media/plugins/ffmpeg/gfx_conv_c.cpp
index 09df531..90b2fbb 100644
--- a/src/add-ons/media/plugins/ffmpeg/gfx_conv_c.cpp
+++ b/src/add-ons/media/plugins/ffmpeg/gfx_conv_c.cpp
@@ -300,8 +300,8 @@ gfx_conv_YCbCr422_RGB32_c(AVFrame *in, AVFrame *out, int 
width, int height)
 void
 gfx_conv_GBRP_RGB32_c(AVFrame *in, AVFrame *out, int width, int height)
 {
-       uint8 *gBase = (uint8 *)in->data[0];
-       uint8 *bBase = (uint8 *)in->data[1];
+       uint8 *bBase = (uint8 *)in->data[0];
+       uint8 *gBase = (uint8 *)in->data[1];
        uint8 *rBase = (uint8 *)in->data[2];
 
        uint32 *rgbBase = (uint32 *)out->data[0];
@@ -312,8 +312,8 @@ gfx_conv_GBRP_RGB32_c(AVFrame *in, AVFrame *out, int width, 
int height)
                        rgbBase[j] = gBase[j] | (bBase[j] << 8) | (rBase[j] << 
16);
                }
 
-               gBase += in->linesize[0];
-               bBase += in->linesize[1];
+               bBase += in->linesize[0];
+               gBase += in->linesize[1];
                rBase += in->linesize[2];
 
                rgbBase += out->linesize[0] / 4;


Other related posts:

  • » [haiku-commits] haiku: hrev51193 - in src: add-ons/media/plugins/ffmpeg apps/mediaplayer/supplier - pulkomandy