diff --git a/ChangeLog b/ChangeLog index 9c1d9f3adf..f588aaa485 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2005-04-23 Luca Ognibene + + Reviewed by: Ronald S. Bultje + + * ext/ffmpeg/gstffmpegenc.c: (gst_ffmpegenc_getcaps): + Don't crash if avcodec_open failed (#301717). + 2005-04-21 Ronald S. Bultje * ext/ffmpeg/gstffmpegdemux.c: (gst_ffmpegdemux_register): diff --git a/ext/ffmpeg/gstffmpegenc.c b/ext/ffmpeg/gstffmpegenc.c index 4e7c2b0fbb..cc815f1d0c 100644 --- a/ext/ffmpeg/gstffmpegenc.c +++ b/ext/ffmpeg/gstffmpegenc.c @@ -331,9 +331,8 @@ gst_ffmpegenc_getcaps (GstPad * pad) caps = gst_caps_new_empty (); gst_caps_append (caps, gst_ffmpeg_codectype_to_caps (oclass->in_plugin->type, ctx)); + avcodec_close (ctx); } - /* FIXME: ffmpeg likes to crash on this */ - avcodec_close (ctx); } av_free (ctx);