ext/ffmpeg/gstffmpegenc.c: Don't crash if avcodec_open failed (#301717).

Original commit message from CVS:
Reviewed by:  Ronald S. Bultje  <rbultje@ronald.bitfreak.net>
* ext/ffmpeg/gstffmpegenc.c: (gst_ffmpegenc_getcaps):
Don't crash if avcodec_open failed (#301717).
This commit is contained in:
Ronald S. Bultje 2005-04-23 16:07:34 +00:00
parent fd7b68e150
commit 3d55f87758
2 changed files with 8 additions and 2 deletions

View file

@ -1,3 +1,10 @@
2005-04-23 Luca Ognibene <luogni@tin.it>
Reviewed by: Ronald S. Bultje <rbultje@ronald.bitfreak.net>
* ext/ffmpeg/gstffmpegenc.c: (gst_ffmpegenc_getcaps):
Don't crash if avcodec_open failed (#301717).
2005-04-21 Ronald S. Bultje <rbultje@ronald.bitfreak.net>
* ext/ffmpeg/gstffmpegdemux.c: (gst_ffmpegdemux_register):

View file

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