Commit d16582fe authored by Edward Hervey's avatar Edward Hervey 🤘

ext/ffmpeg/gstffmpegdec.c: Finalizing a decoder that was never used shouldn't trigger an assertion.

Original commit message from CVS:
* ext/ffmpeg/gstffmpegdec.c: (gst_ffmpegdec_finalize),
(gst_ffmpegdec_get_buffer), (gst_ffmpegdec_frame):
Finalizing a decoder that was never used shouldn't trigger an assertion.
Add debug messages for the two other g_assert_if_reached().
parent 459ba46c
2008-08-29 Edward Hervey <edward.hervey@collabora.co.uk>
* ext/ffmpeg/gstffmpegdec.c: (gst_ffmpegdec_finalize),
(gst_ffmpegdec_get_buffer), (gst_ffmpegdec_frame):
Finalizing a decoder that was never used shouldn't trigger an assertion.
Add debug messages for the two other g_assert_if_reached().
2008-08-29 Edward Hervey <edward.hervey@collabora.co.uk>
* ext/ffmpeg/gstffmpegcodecmap.c: (gst_ff_aud_caps_new):
......
......@@ -358,12 +358,13 @@ gst_ffmpegdec_finalize (GObject * object)
{
GstFFMpegDec *ffmpegdec = (GstFFMpegDec *) object;
g_assert (!ffmpegdec->opened);
/* clean up remaining allocated data */
av_free (ffmpegdec->context);
av_free (ffmpegdec->picture);
if (ffmpegdec->opened) {
/* clean up remaining allocated data */
av_free (ffmpegdec->context);
av_free (ffmpegdec->picture);
}
G_OBJECT_CLASS (parent_class)->finalize (object);
}
......@@ -862,6 +863,7 @@ gst_ffmpegdec_get_buffer (AVCodecContext * context, AVFrame * picture)
}
case CODEC_TYPE_AUDIO:
default:
GST_ERROR_OBJECT (ffmpegdec, "_get_buffer() should never get called for non-video buffers !");
g_assert_not_reached ();
break;
}
......@@ -1856,6 +1858,7 @@ gst_ffmpegdec_frame (GstFFMpegDec * ffmpegdec,
in_duration, &outbuf, ret);
break;
default:
GST_ERROR_OBJECT (ffmpegdec, "Asked to decode non-audio/video frame !");
g_assert_not_reached ();
break;
}
......
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