ext/dvdnav/dvdnavsrc.c: Prevent double free. Fixes bug #541697.

Original commit message from CVS:
Patch by: Tal Shalif <tshalif at nargila dot org>
* ext/dvdnav/dvdnavsrc.c: (gst_dvd_nav_src_stop):
Prevent double free. Fixes bug #541697.
This commit is contained in:
Tal Shalif 2008-07-05 18:57:30 +00:00 committed by Sebastian Dröge
parent e701517a31
commit 71c3c41c66
2 changed files with 13 additions and 5 deletions

View file

@ -1,3 +1,10 @@
2008-07-05 Sebastian Dröge <sebastian.droege@collabora.co.uk>
Patch by: Tal Shalif <tshalif at nargila dot org>
* ext/dvdnav/dvdnavsrc.c: (gst_dvd_nav_src_stop):
Prevent double free. Fixes bug #541697.
2008-07-05 Mark Nauwelaerts <mark.nauwelaerts@collabora.co.uk> 2008-07-05 Mark Nauwelaerts <mark.nauwelaerts@collabora.co.uk>
* gst/mpegstream/gstdvddemux.c: (gst_dvd_demux_base_init), * gst/mpegstream/gstdvddemux.c: (gst_dvd_demux_base_init),

View file

@ -620,8 +620,8 @@ gst_dvd_nav_src_update_tmaps (GstDvdNavSrc * src)
int tmap_length; int tmap_length;
tmap_length = tmap_length =
(src->title_tmap->map_ent[src->title_tmap-> (src->title_tmap->map_ent[src->
nr_of_entries] & 0x7fffffff); title_tmap->nr_of_entries] & 0x7fffffff);
if (tmap_length >= dvdnav_length) { if (tmap_length >= dvdnav_length) {
GST_LOG_OBJECT (src, "Using time maps for seeking"); GST_LOG_OBJECT (src, "Using time maps for seeking");
} else { } else {
@ -1682,8 +1682,7 @@ gst_dvd_nav_src_process_next_block (GstDvdNavSrc * src, GstBuffer ** p_buf)
GST_DVD_NAV_SRC_PAUSE_INTERVAL); GST_DVD_NAV_SRC_PAUSE_INTERVAL);
GstClock *system_clock = gst_system_clock_obtain (); GstClock *system_clock = gst_system_clock_obtain ();
GstClockTime cur_time = gst_clock_get_internal_time (system_clock); GstClockTime cur_time = gst_clock_get_internal_time (system_clock);
GstClockID id = GstClockID id = gst_clock_new_single_shot_id (system_clock,
gst_clock_new_single_shot_id (system_clock,
cur_time + GST_DVD_NAV_SRC_PAUSE_INTERVAL); cur_time + GST_DVD_NAV_SRC_PAUSE_INTERVAL);
gst_clock_id_wait (id, NULL); gst_clock_id_wait (id, NULL);
gst_clock_id_unref (id); gst_clock_id_unref (id);
@ -2067,8 +2066,10 @@ gst_dvd_nav_src_stop (GstBaseSrc * basesrc)
} }
/* Close old vts file if opened */ /* Close old vts file if opened */
if (src->vts_file) if (src->vts_file) {
ifoClose (src->vts_file); ifoClose (src->vts_file);
src->vts_file = NULL;
}
/* Close the video manager */ /* Close the video manager */
ifoClose (src->vmg_file); ifoClose (src->vmg_file);