+2004-04-09 Benjamin Otte <otte@gnome.org>
+
+ * ext/gnomevfs/gstgnomevfssink.c:
+ (_gst_boolean_allow_overwrite_accumulator),
+ (gst_gnomevfssink_class_init):
+ fix erase signal - if any handler returns false the file will not be
+ overwritten. If no handler is connected, the file will not be
+ overwritten either.
+ renamed signal to "allow-overwrite"
+ * ext/mad/gstid3tag.c: (tag_list_to_id3_tag_foreach):
+ free string when adding it to ID3 failed
+ * ext/vorbis/vorbisdec.c: (vorbis_dec_event):
+ unref event when done
+ * gst/audioconvert/gstaudioconvert.c: (_fixate_caps_to_int):
+ free caps
+ * gst/typefind/gsttypefindfunctions.c:
+ (mpeg_video_stream_type_find):
+ fix invalid read
+
2004-04-08 David Schleef <ds@schleef.org>
* gst/ffmpegcolorspace/gstffmpegcolorspace.c:
}
static gboolean
-_gst_boolean_did_something_accumulator (GSignalInvocationHint * ihint,
+_gst_boolean_allow_overwrite_accumulator (GSignalInvocationHint * ihint,
GValue * return_accu, const GValue * handler_return, gpointer dummy)
{
- gboolean did_something;
+ gboolean allow_overwrite;
- did_something = g_value_get_boolean (handler_return);
- if (did_something) {
- g_value_set_boolean (return_accu, TRUE);
- }
+ allow_overwrite = g_value_get_boolean (handler_return);
+ g_value_set_boolean (return_accu, allow_overwrite);
- /* always continue emission */
- return TRUE;
+ /* stop emission if signal doesn't allow overwriting */
+ return allow_overwrite;
}
static void
"GnomeVFSHandle", "Handle for GnomeVFS", G_PARAM_READWRITE));
gst_gnomevfssink_signals[SIGNAL_ERASE_ASK] =
- g_signal_new ("erase-ask", G_TYPE_FROM_CLASS (klass), G_SIGNAL_RUN_LAST,
- G_STRUCT_OFFSET (GstGnomeVFSSinkClass, erase_ask),
- _gst_boolean_did_something_accumulator, NULL,
+ g_signal_new ("allow-overwrite", G_TYPE_FROM_CLASS (klass),
+ G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (GstGnomeVFSSinkClass, erase_ask),
+ _gst_boolean_allow_overwrite_accumulator, NULL,
gst_marshal_BOOLEAN__POINTER, G_TYPE_BOOLEAN, 1, G_TYPE_POINTER);
GST_ERROR_OBJECT (dec,
"failed to parse data for DISCONT event, not sending any");
}
+ gst_data_unref (GST_DATA (event));
#ifdef HAVE_VORBIS_SYNTHESIS_RESTART
vorbis_synthesis_restart (&dec->vd);
#endif
gboolean ret = FALSE;
guint i;
- try =
- gst_caps_new_simple ("audio/x-raw-int", field, GST_TYPE_INT_RANGE,
- G_MININT, value - 1, NULL), gst_caps_append (try,
- gst_caps_new_simple ("audio/x-raw-float", field, GST_TYPE_INT_RANGE,
- G_MININT, value - 1, NULL));
+ try = gst_caps_new_simple ("audio/x-raw-int", field, GST_TYPE_INT_RANGE,
+ G_MININT, value - 1, NULL);
+ gst_caps_append (try, gst_caps_new_simple ("audio/x-raw-float", field,
+ GST_TYPE_INT_RANGE, G_MININT, value - 1, NULL));
intersection = gst_caps_intersect (*caps, try);
if (!gst_caps_is_empty (intersection)) {
gst_caps_free (try);
- try =
- gst_caps_new_simple ("audio/x-raw-int", field, GST_TYPE_INT_RANGE,
- value, G_MAXINT, NULL), gst_caps_append (try,
- gst_caps_new_simple ("audio/x-raw-float", field, GST_TYPE_INT_RANGE,
- value, G_MAXINT, NULL));
+ try = gst_caps_new_simple ("audio/x-raw-int", field, GST_TYPE_INT_RANGE,
+ value, G_MAXINT, NULL);
+ gst_caps_append (try, gst_caps_new_simple ("audio/x-raw-float", field,
+ GST_TYPE_INT_RANGE, value, G_MAXINT, NULL));
gst_caps_free (intersection);
intersection = gst_caps_intersect (*caps, try);
if (!gst_caps_is_empty (intersection)) {
gst_caps_free (intersection);
}
}
+ gst_caps_free (try);
for (i = 0; i < gst_caps_get_size (*caps); i++) {
GstStructure *structure = gst_caps_get_structure (*caps, i);
if (skipped > GST_MPEGVID_TYPEFIND_TRY_SYNC)
break;
- if (size < 4) {
+ if (size < 5) {
data = gst_type_find_peek (tf, skipped, GST_MPEGVID_TYPEFIND_SYNC_SIZE);
if (!data)
break;