ext/ffmpeg/gstffmpegenc.c: Fix use of already-freed caps.

Original commit message from CVS:
* ext/ffmpeg/gstffmpegenc.c: (gst_ffmpegenc_connect): Fix use of
already-freed caps.
This commit is contained in:
David Schleef 2004-01-16 19:54:16 +00:00
parent 8a6c344dc7
commit df75119488

View file

@ -370,8 +370,10 @@ gst_ffmpegenc_connect (GstPad *pad,
* function. */
if (!gst_pad_set_explicit_caps (ffmpegenc->srcpad, icaps)) {
avcodec_close (ffmpegenc->context);
gst_caps_free (icaps);
return GST_PAD_LINK_REFUSED;
}
gst_caps_free (icaps);
/* success! */
ffmpegenc->opened = TRUE;