mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-24 01:00:37 +00:00
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).
This commit is contained in:
parent
363794a122
commit
cdcc9bc7cf
2 changed files with 7 additions and 1 deletions
|
@ -1,3 +1,8 @@
|
|||
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,6 +389,7 @@ gst_ffmpegenc_link (GstPad * pad, const GstCaps * caps)
|
|||
|
||||
/* open codec */
|
||||
if (avcodec_open (ffmpegenc->context, oclass->in_plugin) < 0) {
|
||||
if (ffmpegenc->context->priv_data)
|
||||
avcodec_close (ffmpegenc->context);
|
||||
GST_DEBUG ("ffenc_%s: Failed to open FFMPEG codec",
|
||||
oclass->in_plugin->name);
|
||||
|
|
Loading…
Reference in a new issue