gnash-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gnash-commit] gnash ChangeLog server/asobj/NetStreamFfmpeg.cpp


From: Bastiaan Jacques
Subject: [Gnash-commit] gnash ChangeLog server/asobj/NetStreamFfmpeg.cpp
Date: Fri, 12 Jan 2007 11:20:15 +0000

CVSROOT:        /sources/gnash
Module name:    gnash
Changes by:     Bastiaan Jacques <bjacques>     07/01/12 11:20:15

Modified files:
        .              : ChangeLog 
        server/asobj   : NetStreamFfmpeg.cpp 

Log message:
        Don't delete the RGB video data buffer until we've actually finished 
using it. Doh!

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.2098&r2=1.2099
http://cvs.savannah.gnu.org/viewcvs/gnash/server/asobj/NetStreamFfmpeg.cpp?cvsroot=gnash&r1=1.3&r2=1.4

Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/gnash/gnash/ChangeLog,v
retrieving revision 1.2098
retrieving revision 1.2099
diff -u -b -r1.2098 -r1.2099
--- ChangeLog   12 Jan 2007 11:05:06 -0000      1.2098
+++ ChangeLog   12 Jan 2007 11:20:15 -0000      1.2099
@@ -1,3 +1,8 @@
+2006-01-12 Bastiaan Jacques <address@hidden>
+
+       * server/asobj/NetStreamFfmpeg.cpp: Don't delete the RGB video data
+       buffer until we've actually finished using it. Doh!
+
 2007-01-12 Sandro Santilli <address@hidden>
 
        * server/vm/ActionExec.{h,cpp}: don't really

Index: server/asobj/NetStreamFfmpeg.cpp
===================================================================
RCS file: /sources/gnash/gnash/server/asobj/NetStreamFfmpeg.cpp,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -b -r1.3 -r1.4
--- server/asobj/NetStreamFfmpeg.cpp    2 Jan 2007 22:27:11 -0000       1.3
+++ server/asobj/NetStreamFfmpeg.cpp    12 Jan 2007 11:20:15 -0000      1.4
@@ -14,7 +14,7 @@
 // along with this program; if not, write to the Free Software
 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 
-/* $Id: NetStreamFfmpeg.cpp,v 1.3 2007/01/02 22:27:11 nihilus Exp $ */
+/* $Id: NetStreamFfmpeg.cpp,v 1.4 2007/01/12 11:20:15 bjacques Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
@@ -530,6 +530,7 @@
                        int got = 0;
                        avcodec_decode_video(m_VCodecCtx, m_Frame, &got, 
packet.data, packet.size);
                        if (got) {
+                               uint8_t *buffer = NULL;
                                int videoFrameFormat = 
gnash::render::videoFrameFormat();
 
                                if (videoFrameFormat == render::NONE) { // 
NullGui?
@@ -543,12 +544,11 @@
                                } else if (videoFrameFormat == render::RGB && 
m_VCodecCtx->pix_fmt != PIX_FMT_RGB24) {
                                        AVFrame* frameRGB = 
avcodec_alloc_frame();
                                        unsigned int numBytes = 
avpicture_get_size(PIX_FMT_RGB24, m_VCodecCtx->width, m_VCodecCtx->height);
-                                       uint8_t *buffer = new uint8_t[numBytes];
+                                       buffer = new uint8_t[numBytes];
                                        avpicture_fill((AVPicture *)frameRGB, 
buffer, PIX_FMT_RGB24, m_VCodecCtx->width, m_VCodecCtx->height);
                                        img_convert((AVPicture*) frameRGB, 
PIX_FMT_RGB24, (AVPicture*) m_Frame, m_VCodecCtx->pix_fmt, m_VCodecCtx->width, 
m_VCodecCtx->height);
                                        av_free(m_Frame);
                                        m_Frame = frameRGB;
-                                       delete [] buffer;
                                }
 
                                raw_videodata_t* video = new raw_videodata_t;
@@ -617,6 +617,7 @@
                                                }
                                        }   
                                }
+                               delete [] buffer;
 
                                m_unqueued_data = m_qvideo.push(video) ? NULL : 
video;
                        }




reply via email to

[Prev in Thread] Current Thread [Next in Thread]