@athoik,
Yes i did not test it before since I thaught it would not bring anything, but it well does.
Initing the pointer to NULL does solve also the problem instead off using the gboolean of the function.
so using.
case GST_EVENT_TAG: { GstTagList *taglist; gst_event_parse_tag(event, &taglist); gchar *vcodec_value = NULL; // initiate pointer to NULL at each tag event GST_INFO_OBJECT(self,"TAG %"GST_PTR_FORMAT, taglist); gst_tag_list_get_string (taglist, "video-codec", &vcodec_value); if (vcodec_value) { if(!strncmp(vcodec_value,"FFmpeg MPEG-4", 13) && self->mpeg4_no_fourcc); { self->stream_type = STREAMTYPE_XVID; self->use_dts = TRUE; #ifdef PACK_UNPACKED_XVID_DIVX5_BITSTREAM self->must_pack_bitstream = TRUE; #endif GST_INFO_OBJECT (self, "VIDEO_CODEC = %s set STREAMTYPE_XVID", vcodec_value); } g_free(vcodec_value); } ret = GST_BASE_SINK_CLASS(parent_class)->event(sink, event); break; }
Works also ok. instead of using the gboolean output off function.