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

ext/ffmpeg/gstffmpegenc.c: Only free context if it was created (otherwise it crashes).

Original commit message from CVS:
* ext/ffmpeg/gstffmpegenc.c: (gst_ffmpegenc_link):
Only free context if it was created (otherwise it crashes).
parent 363794a1
2005-02-05 Ronald S. Bultje <rbultje@ronald.bitfreak.net>
* ext/ffmpeg/gstffmpegenc.c: (gst_ffmpegenc_link):
Only free context if it was created (otherwise it crashes).
2005-02-04 Jan Schmidt <thaytan@mad.scientist.com>
* ext/ffmpeg/gstffmpegdec.c: (gst_ffmpegdec_frame),
......
......@@ -389,7 +389,8 @@ gst_ffmpegenc_link (GstPad * pad, const GstCaps * caps)
/* open codec */
if (avcodec_open (ffmpegenc->context, oclass->in_plugin) < 0) {
avcodec_close (ffmpegenc->context);
if (ffmpegenc->context->priv_data)
avcodec_close (ffmpegenc->context);
GST_DEBUG ("ffenc_%s: Failed to open FFMPEG codec",
oclass->in_plugin->name);
return GST_PAD_LINK_REFUSED;
......
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