mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-22 08:17:01 +00:00
vp9dec: Fix segfault when a new caps is received
Remember to unref the output caps when a new caps event is received as it should generate a new one based on the new caps. https://bugzilla.gnome.org/show_bug.cgi?id=734266
This commit is contained in:
parent
0430ea87a3
commit
8bee49c85e
1 changed files with 5 additions and 0 deletions
|
@ -318,6 +318,11 @@ gst_vp9_dec_set_format (GstVideoDecoder * decoder, GstVideoCodecState * state)
|
||||||
vpx_codec_destroy (&gst_vp9_dec->decoder);
|
vpx_codec_destroy (&gst_vp9_dec->decoder);
|
||||||
gst_vp9_dec->decoder_inited = FALSE;
|
gst_vp9_dec->decoder_inited = FALSE;
|
||||||
|
|
||||||
|
if (gst_vp9_dec->output_state) {
|
||||||
|
gst_video_codec_state_unref (gst_vp9_dec->output_state);
|
||||||
|
gst_vp9_dec->output_state = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
if (gst_vp9_dec->input_state)
|
if (gst_vp9_dec->input_state)
|
||||||
gst_video_codec_state_unref (gst_vp9_dec->input_state);
|
gst_video_codec_state_unref (gst_vp9_dec->input_state);
|
||||||
gst_vp9_dec->input_state = gst_video_codec_state_ref (state);
|
gst_vp9_dec->input_state = gst_video_codec_state_ref (state);
|
||||||
|
|
Loading…
Reference in a new issue