mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-18 22:36:33 +00:00
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().
This commit is contained in:
parent
459ba46c22
commit
d16582feb6
2 changed files with 15 additions and 5 deletions
|
@ -1,3 +1,10 @@
|
||||||
|
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>
|
2008-08-29 Edward Hervey <edward.hervey@collabora.co.uk>
|
||||||
|
|
||||||
* ext/ffmpeg/gstffmpegcodecmap.c: (gst_ff_aud_caps_new):
|
* ext/ffmpeg/gstffmpegcodecmap.c: (gst_ff_aud_caps_new):
|
||||||
|
|
|
@ -358,12 +358,13 @@ gst_ffmpegdec_finalize (GObject * object)
|
||||||
{
|
{
|
||||||
GstFFMpegDec *ffmpegdec = (GstFFMpegDec *) object;
|
GstFFMpegDec *ffmpegdec = (GstFFMpegDec *) object;
|
||||||
|
|
||||||
g_assert (!ffmpegdec->opened);
|
if (ffmpegdec->opened) {
|
||||||
|
|
||||||
/* clean up remaining allocated data */
|
/* clean up remaining allocated data */
|
||||||
av_free (ffmpegdec->context);
|
av_free (ffmpegdec->context);
|
||||||
av_free (ffmpegdec->picture);
|
av_free (ffmpegdec->picture);
|
||||||
|
|
||||||
|
}
|
||||||
G_OBJECT_CLASS (parent_class)->finalize (object);
|
G_OBJECT_CLASS (parent_class)->finalize (object);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -862,6 +863,7 @@ gst_ffmpegdec_get_buffer (AVCodecContext * context, AVFrame * picture)
|
||||||
}
|
}
|
||||||
case CODEC_TYPE_AUDIO:
|
case CODEC_TYPE_AUDIO:
|
||||||
default:
|
default:
|
||||||
|
GST_ERROR_OBJECT (ffmpegdec, "_get_buffer() should never get called for non-video buffers !");
|
||||||
g_assert_not_reached ();
|
g_assert_not_reached ();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -1856,6 +1858,7 @@ gst_ffmpegdec_frame (GstFFMpegDec * ffmpegdec,
|
||||||
in_duration, &outbuf, ret);
|
in_duration, &outbuf, ret);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
GST_ERROR_OBJECT (ffmpegdec, "Asked to decode non-audio/video frame !");
|
||||||
g_assert_not_reached ();
|
g_assert_not_reached ();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue