gnash-commit
[Top][All Lists]
Advanced

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

[Gnash-commit] gnash ChangeLog libbase/embedVideoDecoderFfmpeg...


From: Sandro Santilli
Subject: [Gnash-commit] gnash ChangeLog libbase/embedVideoDecoderFfmpeg...
Date: Sat, 09 Jun 2007 12:43:38 +0000

CVSROOT:        /sources/gnash
Module name:    gnash
Changes by:     Sandro Santilli <strk>  07/06/09 12:43:38

Modified files:
        .              : ChangeLog 
        libbase        : embedVideoDecoderFfmpeg.cpp 

Log message:
                * libbase/embedVideoDecoderFfmpeg.cpp (decodeFrame): do not
                  access a null decodedFrame (tgc: please check).

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.3503&r2=1.3504
http://cvs.savannah.gnu.org/viewcvs/gnash/libbase/embedVideoDecoderFfmpeg.cpp?cvsroot=gnash&r1=1.18&r2=1.19

Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/gnash/gnash/ChangeLog,v
retrieving revision 1.3503
retrieving revision 1.3504
diff -u -b -r1.3503 -r1.3504
--- ChangeLog   8 Jun 2007 21:58:04 -0000       1.3503
+++ ChangeLog   9 Jun 2007 12:43:37 -0000       1.3504
@@ -1,3 +1,8 @@
+2007-06-09 Sandro Santilli <address@hidden>
+
+       * libbase/embedVideoDecoderFfmpeg.cpp (decodeFrame): do not
+         access a null decodedFrame (tgc: please check).
+
 2007-06-08 Tomas Groth Christensen <address@hidden>
 
        * libbase/embedVideoDecoderFfmpeg.{cpp,h}: Store decodedFrame

Index: libbase/embedVideoDecoderFfmpeg.cpp
===================================================================
RCS file: /sources/gnash/gnash/libbase/embedVideoDecoderFfmpeg.cpp,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -b -r1.18 -r1.19
--- libbase/embedVideoDecoderFfmpeg.cpp 8 Jun 2007 21:58:06 -0000       1.18
+++ libbase/embedVideoDecoderFfmpeg.cpp 9 Jun 2007 12:43:38 -0000       1.19
@@ -160,7 +160,16 @@
 
        // If there is nothing to decode in the new frame
        // we just return the lastest.
-       if (data == NULL || codec == NULL || size == 0) {
+       if (data == NULL || codec == NULL || size == 0)
+       {
+               // If haven't decoded any frame yet, return
+               // the null pointer.
+               if ( ! decodedFrame.get() )
+               {
+                       ret_image.reset(NULL);
+                       return ret_image;
+               }
+
                ret_image->update(decodedFrame->m_data);
                return ret_image;
        }
@@ -241,6 +250,13 @@
        }
 
        av_free(frame);
+       // If haven't decoded any frame yet, return
+       // the null pointer.
+       if ( ! decodedFrame.get() )
+       {
+               ret_image.reset(NULL);
+               return ret_image;
+       }
        ret_image->update(decodedFrame->m_data);
        return ret_image;
 }




reply via email to

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