Don't flush if we come across a cue tag.

Original commit message from CVS:
Don't flush if we come across a cue tag.
Emit the got metadata signal once we've parsed the adtl tag
This commit is contained in:
Iain Holmes 2003-11-14 15:02:42 +00:00
parent 80975b95f6
commit b8a295b778

View file

@ -424,6 +424,8 @@ gst_wavparse_parse_adtl (GstWavParse *wavparse,
return; return;
} }
} }
g_object_notify (G_OBJECT (wavparse), "metadata");
} }
static void static void
@ -555,6 +557,8 @@ gst_wavparse_parse_cues (GstWavParse *wavparse,
GstPropsEntry *entry; GstPropsEntry *entry;
while (len > 0) { while (len > 0) {
int required;
got_bytes = gst_bytestream_peek_bytes (bs, &tempdata, sizeof (struct _gst_riff_cue)); got_bytes = gst_bytestream_peek_bytes (bs, &tempdata, sizeof (struct _gst_riff_cue));
temp_cue = (struct _gst_riff_cue *) tempdata; temp_cue = (struct _gst_riff_cue *) tempdata;
@ -572,9 +576,10 @@ gst_wavparse_parse_cues (GstWavParse *wavparse,
/* -4 because cue.size contains the cuepoints size /* -4 because cue.size contains the cuepoints size
and we've already flushed that out of the system */ and we've already flushed that out of the system */
got_bytes = gst_bytestream_peek_bytes (bs, &tempdata, cue.size - 4); required = cue.size - 4;
gst_bytestream_flush (bs, ((cue.size - 4) + 1) & ~1); got_bytes = gst_bytestream_peek_bytes (bs, &tempdata, required);
if (got_bytes != cue.size - 4) { gst_bytestream_flush (bs, ((required) + 1) & ~1);
if (got_bytes != required) {
return; return;
} }
@ -814,6 +819,10 @@ gst_wavparse_loop (GstElement *element)
skipsize = sizeof (gst_riff_list); skipsize = sizeof (gst_riff_list);
break; break;
case GST_RIFF_TAG_cue:
skipsize = 0;
break;
default: default:
skipsize = sizeof (gst_riff_chunk); skipsize = sizeof (gst_riff_chunk);
break; break;