Commit a70c3d36 authored by Ronald S. Bultje's avatar Ronald S. Bultje

ext/ffmpeg/gstffmpegdec.c: Unref when not usable.

Original commit message from CVS:
* ext/ffmpeg/gstffmpegdec.c: (gst_ffmpegdec_chain):
Unref when not usable.
parent 673536e8
2004-10-09 Ronald S. Bultje <rbultje@ronald.bitfreak.net>
* ext/ffmpeg/gstffmpegdec.c: (gst_ffmpegdec_chain):
Unref when not usable.
2004-10-04 Ronald S. Bultje <rbultje@ronald.bitfreak.net>
* ext/ffmpeg/gstffmpegcodecmap.c: (gst_ffmpeg_codecid_to_caps),
......
......@@ -445,7 +445,7 @@ gst_ffmpegdec_chain (GstPad * pad, GstData * _data)
return;
}
if (have_data) {
if (len >= 0 && have_data) {
GST_BUFFER_SIZE (outbuf) = have_data;
if (GST_CLOCK_TIME_IS_VALID (expected_ts)) {
GST_BUFFER_TIMESTAMP (outbuf) = expected_ts;
......@@ -492,12 +492,16 @@ gst_ffmpegdec_chain (GstPad * pad, GstData * _data)
oclass->in_plugin->name));
if (caps != NULL)
gst_caps_free (caps);
gst_buffer_unref (outbuf);
return;
}
gst_caps_free (caps);
}
gst_pad_push (ffmpegdec->srcpad, GST_DATA (outbuf));
if (GST_PAD_IS_USABLE (ffmpegdec->srcpad))
gst_pad_push (ffmpegdec->srcpad, GST_DATA (outbuf));
else
gst_buffer_unref (outbuf);
}
size -= len;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment