gst/asfdemux/gstasfdemux.c: Fix silly bug when we can't pull as much data as we want; don't forget to announce pendin...

Original commit message from CVS:
* gst/asfdemux/gstasfdemux.c: (gst_asf_demux_pull_data),
(gst_asf_demux_push_complete_payloads), (gst_asf_demux_loop):
Fix silly bug when we can't pull as much data as we want; don't
forget to announce pending tags in the new packet parsing code.
This commit is contained in:
Tim-Philipp Müller 2007-04-27 18:39:21 +00:00
parent f41decd66a
commit 9ee314648e
2 changed files with 17 additions and 1 deletions

View file

@ -1,3 +1,10 @@
2007-04-27 Tim-Philipp Müller <tim at centricular dot net>
* gst/asfdemux/gstasfdemux.c: (gst_asf_demux_pull_data),
(gst_asf_demux_push_complete_payloads), (gst_asf_demux_loop):
Fix silly bug when we can't pull as much data as we want; don't
forget to announce pending tags in the new packet parsing code.
2007-04-25 Tim-Philipp Müller <tim at centricular dot net>
* configure.ac:

View file

@ -749,7 +749,7 @@ gst_asf_demux_pull_data (GstASFDemux * demux, guint64 offset, guint size,
GST_DEBUG_OBJECT (demux, "short read pulling buffer at %" G_GUINT64_FORMAT
"+%u (got only %u bytes)", offset, size, GST_BUFFER_SIZE (*p_buf));
gst_buffer_unref (*p_buf);
if (*p_flow)
if (p_flow)
*p_flow = GST_FLOW_UNEXPECTED;
*p_buf = NULL;
return FALSE;
@ -940,6 +940,14 @@ gst_asf_demux_push_complete_payloads (GstASFDemux * demux)
if (!gst_asf_payload_is_complete (payload))
break;
/* Do we have tags pending for this stream? */
if (stream->pending_tags) {
GST_LOG_OBJECT (stream->pad, "%" GST_PTR_FORMAT, stream->pending_tags);
gst_element_found_tags_for_pad (GST_ELEMENT (demux), stream->pad,
stream->pending_tags);
stream->pending_tags = NULL;
}
/* We have the whole packet now so we should push the packet to
* the src pad now. First though we should check if we need to do
* descrambling */
@ -1093,6 +1101,7 @@ read_failed:
{
/* upstream should already have posted an error */
GST_ELEMENT_ERROR (demux, STREAM, DEMUX, (NULL), ("pull_range failed"));
gst_asf_demux_send_event_unlocked (demux, gst_event_new_eos ());
goto pause;
}
}