gst-libs/gst/cdda/gstcddabasesrc.c: Fix EOS condition and track addition check, the track.end sector is included in t...

Original commit message from CVS:
* gst-libs/gst/cdda/gstcddabasesrc.c:
(gst_cdda_base_src_add_track), (gst_cdda_base_src_create):
Fix EOS condition and track addition check, the track.end sector is
included in the track. Fixes #533265.
This commit is contained in:
Wim Taymans 2008-05-28 15:48:33 +00:00
parent 17b17a566f
commit 2855fb48ad
2 changed files with 10 additions and 3 deletions

View file

@ -1,3 +1,10 @@
2008-05-28 Wim Taymans <wim.taymans@collabora.co.uk>
* gst-libs/gst/cdda/gstcddabasesrc.c:
(gst_cdda_base_src_add_track), (gst_cdda_base_src_create):
Fix EOS condition and track addition check, the track.end sector is
included in the track. Fixes #533265.
2008-05-28 Wim Taymans <wim.taymans@collabora.co.uk>
Patch by: Mark Nauwelaerts <manauw at skynet be>

View file

@ -1027,7 +1027,7 @@ gst_cdda_base_src_add_track (GstCddaBaseSrc * src, GstCddaBaseSrcTrack * track)
if (src->num_tracks > 0) {
guint end_of_previous_track = src->tracks[src->num_tracks - 1].end;
if (track->start < end_of_previous_track) {
if (track->start <= end_of_previous_track) {
GST_WARNING ("track %2u overlaps with previous tracks", track->num);
return FALSE;
}
@ -1517,10 +1517,10 @@ gst_cdda_base_src_create (GstPushSrc * pushsrc, GstBuffer ** buffer)
switch (src->mode) {
case GST_CDDA_BASE_SRC_MODE_NORMAL:
eos = (src->cur_sector >= src->tracks[src->cur_track].end);
eos = (src->cur_sector > src->tracks[src->cur_track].end);
break;
case GST_CDDA_BASE_SRC_MODE_CONTINUOUS:
eos = (src->cur_sector >= src->tracks[src->num_tracks - 1].end);
eos = (src->cur_sector > src->tracks[src->num_tracks - 1].end);
src->cur_track = gst_cdda_base_src_get_track_from_sector (src,
src->cur_sector);
break;