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

Original commit message from CVS:
* ext/ffmpeg/gstffmpegdec.c: (gst_ffmpegdec_chain):
Unref when not usable.
This commit is contained in:
Ronald S. Bultje 2004-10-09 16:13:31 +00:00
parent 673536e862
commit a70c3d36fb
2 changed files with 11 additions and 2 deletions

View file

@ -1,3 +1,8 @@
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),

View file

@ -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;