From f35fa8bd79e94873fd6920ab7c8f2ea37509eabc Mon Sep 17 00:00:00 2001 From: Benjamin Otte Date: Tue, 6 Apr 2004 23:46:01 +0000 Subject: [PATCH] ext/gnomevfs/gstgnomevfssrc.c: actually free the URI string Original commit message from CVS: * ext/gnomevfs/gstgnomevfssrc.c: (gst_gnomevfssrc_dispose): actually free the URI string * ext/mad/gstid3tag.c: (gst_id3_tag_src_event): compute offset correctly when passing discont events * ext/mad/gstid3tag.c: (gst_id3_tag_handle_event): don't leak discont events * gst/asfdemux/gstasfdemux.c: (gst_asf_demux_video_caps): add some missing breaks so caps aren't copied randomly * gst/mpegstream/gstmpegdemux.c: (gst_mpeg_demux_get_video_stream): if we realloc memory, we better use it --- ChangeLog | 13 +++++++++++++ ext/mad/gstid3tag.c | 4 +++- gst/asfdemux/gstasfdemux.c | 3 +++ gst/mpegstream/gstmpegdemux.c | 2 +- 4 files changed, 20 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index c4e2bb5..827e785 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,16 @@ +2004-04-07 Benjamin Otte + + * ext/gnomevfs/gstgnomevfssrc.c: (gst_gnomevfssrc_dispose): + actually free the URI string + * ext/mad/gstid3tag.c: (gst_id3_tag_src_event): + compute offset correctly when passing discont events + * ext/mad/gstid3tag.c: (gst_id3_tag_handle_event): + don't leak discont events + * gst/asfdemux/gstasfdemux.c: (gst_asf_demux_video_caps): + add some missing breaks so caps aren't copied randomly + * gst/mpegstream/gstmpegdemux.c: (gst_mpeg_demux_get_video_stream): + if we realloc memory, we better use it + 2004-04-06 Benjamin Otte * ext/mad/gstmad.c: (normal_seek): diff --git a/ext/mad/gstid3tag.c b/ext/mad/gstid3tag.c index a8ec25b..d27bf0f 100644 --- a/ext/mad/gstid3tag.c +++ b/ext/mad/gstid3tag.c @@ -438,7 +438,7 @@ gst_id3_tag_src_event (GstPad * pad, GstEvent * event) switch (GST_EVENT_SEEK_METHOD (event)) { case GST_SEEK_METHOD_SET: - diff = tag->v2tag_size_new - tag->v2tag_size; + diff = tag->v2tag_size - tag->v2tag_size_new; break; case GST_SEEK_METHOD_CUR: break; @@ -709,6 +709,7 @@ gst_id3_tag_handle_event (GstPad * pad, GstEvent * event) case GST_ID3_TAG_STATE_SEEKING_TO_V1_TAG: /* just assume it's the right seek for now */ gst_id3_tag_set_state (tag, GST_ID3_TAG_STATE_READING_V1_TAG); + gst_data_unref (GST_DATA (event)); break; case GST_ID3_TAG_STATE_READING_V1_TAG: GST_ELEMENT_ERROR (tag, CORE, EVENT, (NULL), @@ -718,6 +719,7 @@ gst_id3_tag_handle_event (GstPad * pad, GstEvent * event) case GST_ID3_TAG_STATE_SEEKING_TO_NORMAL: /* just assume it's the right seek for now */ gst_id3_tag_set_state (tag, GST_ID3_TAG_STATE_NORMAL_START); + gst_data_unref (GST_DATA (event)); break; case GST_ID3_TAG_STATE_NORMAL_START: GST_ERROR_OBJECT (tag, "tag event not sent, FIXME"); diff --git a/gst/asfdemux/gstasfdemux.c b/gst/asfdemux/gstasfdemux.c index 80d05c2..8127578 100644 --- a/gst/asfdemux/gstasfdemux.c +++ b/gst/asfdemux/gstasfdemux.c @@ -1559,6 +1559,7 @@ gst_asf_demux_video_caps (guint32 codec_fcc, "format", GST_TYPE_FOURCC, codec_fcc, NULL); if (codec_name) *codec_name = g_strdup ("Raw, uncompressed I420"); + break; case GST_MAKE_FOURCC ('Y', 'U', 'Y', '2'): caps = gst_caps_new_simple ("video/x-raw-yuv", "format", GST_TYPE_FOURCC, codec_fcc, NULL); @@ -1570,10 +1571,12 @@ gst_asf_demux_video_caps (guint32 codec_fcc, caps = gst_caps_new_simple ("video/x-jpeg", NULL); if (codec_name) *codec_name = g_strdup ("Motion JPEG"); + break; case GST_MAKE_FOURCC ('J', 'P', 'E', 'G'): caps = gst_caps_new_simple ("video/x-jpeg", NULL); if (codec_name) *codec_name = g_strdup ("JPEG Still Image"); + break; case GST_MAKE_FOURCC ('P', 'I', 'X', 'L'): case GST_MAKE_FOURCC ('V', 'I', 'X', 'L'): caps = gst_caps_new_simple ("video/x-jpeg", NULL); diff --git a/gst/mpegstream/gstmpegdemux.c b/gst/mpegstream/gstmpegdemux.c index b364040..b7bd35c 100644 --- a/gst/mpegstream/gstmpegdemux.c +++ b/gst/mpegstream/gstmpegdemux.c @@ -391,7 +391,7 @@ gst_mpeg_demux_get_video_stream (GstMPEGDemux * mpeg_demux, /* This stream may have been created by a derived class, reset the size. */ video_str = g_renew (GstMPEGVideoStream, str, 1); - str = (GstMPEGStream *) video_str; + mpeg_demux->video_stream[stream_nr] = str = (GstMPEGStream *) video_str; } if (str->type != GST_MPEG_DEMUX_VIDEO_MPEG || -- 2.7.4