Original commit message from CVS:
2005-07-19 Andy Wingo <wingo@pobox.com>
* ext/dv/gstdvdec.c (gst_dvdec_decode_video): Don't clobber
alloc_buffer's return value.
(gst_dvdec_decode_frame): Handle unlinked pads with grace and
agility.
2005-07-19 Andy Wingo <wingo@pobox.com>
2005-07-19 Andy Wingo <wingo@pobox.com>
+ * ext/dv/gstdvdec.c (gst_dvdec_decode_video): Don't clobber
+ alloc_buffer's return value.
+ (gst_dvdec_decode_frame): Handle unlinked pads with grace and
+ agility.
+
* ext/dv/gstdvdec.h: Fix signedness error.
2005-07-19 Wim Taymans <wim@fluendo.com>
* ext/dv/gstdvdec.h: Fix signedness error.
2005-07-19 Wim Taymans <wim@fluendo.com>
static gboolean
gst_dvdec_send_event (GstDVDec * dvdec, GstEvent * event)
{
static gboolean
gst_dvdec_send_event (GstDVDec * dvdec, GstEvent * event)
{
- res &= gst_pad_push_event (dvdec->videosrcpad, event);
- res &= gst_pad_push_event (dvdec->audiosrcpad, event);
+ res |= gst_pad_push_event (dvdec->videosrcpad, event);
+ res |= gst_pad_push_event (dvdec->audiosrcpad, event);
goto skip;
dvdec->framecount = 0;
goto skip;
dvdec->framecount = 0;
- if ((gst_pad_alloc_buffer (dvdec->videosrcpad, 0, (720 * height) * dvdec->bpp,
- GST_PAD_CAPS (dvdec->videosrcpad), &outbuf)) != GST_FLOW_OK)
+ ret =
+ gst_pad_alloc_buffer (dvdec->videosrcpad, 0, (720 * height) * dvdec->bpp,
+ GST_PAD_CAPS (dvdec->videosrcpad), &outbuf);
+ if (ret != GST_FLOW_OK)
goto no_buffer;
outframe = GST_BUFFER_DATA (outbuf);
goto no_buffer;
outframe = GST_BUFFER_DATA (outbuf);
/* ERRORS */
no_buffer:
{
/* ERRORS */
no_buffer:
{
- return GST_FLOW_WRONG_STATE;
{
GstClockTime next_ts;
gdouble framerate;
{
GstClockTime next_ts;
gdouble framerate;
+ GstFlowReturn aret, vret, ret;
if (dvdec->need_discont) {
GstEvent *event;
if (dvdec->need_discont) {
GstEvent *event;
if (dv_is_new_recording (dvdec->decoder, data))
dvdec->new_media = TRUE;
if (dv_is_new_recording (dvdec->decoder, data))
dvdec->new_media = TRUE;
- ret = gst_dvdec_decode_audio (dvdec, data);
- if (ret != GST_FLOW_OK)
+ aret = ret = gst_dvdec_decode_audio (dvdec, data);
+ if (ret != GST_FLOW_OK && ret != GST_FLOW_NOT_LINKED)
- ret = gst_dvdec_decode_video (dvdec, data);
- if (ret != GST_FLOW_OK)
+ vret = ret = gst_dvdec_decode_video (dvdec, data);
+ if (ret != GST_FLOW_OK && ret != GST_FLOW_NOT_LINKED)
+ goto done;
+
+ if (aret == GST_FLOW_NOT_LINKED && vret == GST_FLOW_NOT_LINKED) {
+ ret = GST_FLOW_NOT_LINKED;
dvdec->timestamp = next_ts;
done:
dvdec->timestamp = next_ts;
done: