[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gnash-commit] gnash ChangeLog libbase/embedVideoDecoderGst.cpp
From: |
Sandro Santilli |
Subject: |
[Gnash-commit] gnash ChangeLog libbase/embedVideoDecoderGst.cpp |
Date: |
Mon, 23 Jul 2007 22:09:49 +0000 |
CVSROOT: /sources/gnash
Module name: gnash
Changes by: Sandro Santilli <strk> 07/07/23 22:09:49
Modified files:
. : ChangeLog
libbase : embedVideoDecoderGst.cpp
Log message:
* libbase/embedVideoDecoderGst.cpp (createDecoder): fix use of
possibly undefined variable warning, added a couple of
assertions
and comments about the why.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.3798&r2=1.3799
http://cvs.savannah.gnu.org/viewcvs/gnash/libbase/embedVideoDecoderGst.cpp?cvsroot=gnash&r1=1.8&r2=1.9
Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/gnash/gnash/ChangeLog,v
retrieving revision 1.3798
retrieving revision 1.3799
diff -u -b -r1.3798 -r1.3799
--- ChangeLog 23 Jul 2007 22:07:58 -0000 1.3798
+++ ChangeLog 23 Jul 2007 22:09:49 -0000 1.3799
@@ -1,5 +1,11 @@
2007-07-23 Sandro Santilli <address@hidden>
+ * libbase/embedVideoDecoderGst.cpp (createDecoder): fix use of
+ possibly undefined variable warning, added a couple of assertions
+ and comments about the why.
+
+2007-07-23 Sandro Santilli <address@hidden>
+
* backend/: sound_handler.{cpp,h}, Makefile.am,
sound_handler_gst.cpp, sound_handler_sdl.cpp,
libbase/: utility.{cpp,h}, server/asobj/SoundMad.cpp:
Index: libbase/embedVideoDecoderGst.cpp
===================================================================
RCS file: /sources/gnash/gnash/libbase/embedVideoDecoderGst.cpp,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -b -r1.8 -r1.9
--- libbase/embedVideoDecoderGst.cpp 1 Jul 2007 10:54:08 -0000 1.8
+++ libbase/embedVideoDecoderGst.cpp 23 Jul 2007 22:09:49 -0000 1.9
@@ -15,7 +15,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: embedVideoDecoderGst.cpp,v 1.8 2007/07/01 10:54:08 bjacques Exp $
+// $Id: embedVideoDecoderGst.cpp,v 1.9 2007/07/23 22:09:49 strk Exp $
#ifdef HAVE_CONFIG_H
#include "config.h"
@@ -82,7 +82,7 @@
// Setup the input capsfilter
inputcaps = gst_element_factory_make ("capsfilter", NULL);
- GstCaps* caps;
+ GstCaps* caps = NULL;
if (format == CODEC_H263) {
caps = gst_caps_new_simple ("video/x-flash-video",
"width", G_TYPE_INT, width,
@@ -103,16 +103,36 @@
"framerate", GST_TYPE_FRACTION, 25, 1,
NULL);
}
+
+ if ( caps )
+ {
g_object_set (G_OBJECT (inputcaps), "caps", caps, NULL);
gst_caps_unref (caps);
+#ifndef NDEBUG
+ caps = NULL; // to check it is not null on next use ...
+#endif
+ }
+ else
+ {
+ log_error("Unknown codec format %d", format);
+ }
// Setup the capsfilter which demands either YUV or RGB videoframe
format
videocaps = gst_element_factory_make ("capsfilter", NULL);
if (outputFormat == YUV) {
caps = gst_caps_new_simple ("video/x-raw-yuv", NULL);
} else {
+ assert(outputFormat == RGB);
caps = gst_caps_new_simple ("video/x-raw-rgb", NULL);
}
+
+ assert(caps); // ok, this is a silly assertion *now*, but as long as
+ // the code is implemented with such long function bodies
+ // a day will come in which someone will change something
+ // a few screefulls above and the assertion would make
+ // sense (maybe boost compile-time assertions could help
+ // in this reguard).
+
g_object_set (G_OBJECT (videocaps), "caps", caps, NULL);
gst_caps_unref (caps);
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Gnash-commit] gnash ChangeLog libbase/embedVideoDecoderGst.cpp,
Sandro Santilli <=