avvidec: Make sure to store newly set caps after resetting the decoder

Otherwise we'll just set the to NULL while resetting the decoder and
don't have them available anymore later.

https://bugzilla.gnome.org/show_bug.cgi?id=697548
This commit is contained in:
Siva Chandran P 2013-04-09 20:40:06 +02:00 committed by Sebastian Dröge
parent f656d9eaf7
commit 758d7bf7ea

View file

@ -371,8 +371,6 @@ gst_ffmpegviddec_set_format (GstVideoDecoder * decoder,
return TRUE;
}
gst_caps_replace (&ffmpegdec->last_caps, state->caps);
GST_DEBUG_OBJECT (ffmpegdec, "setcaps called");
GST_OBJECT_LOCK (ffmpegdec);
@ -389,6 +387,8 @@ gst_ffmpegviddec_set_format (GstVideoDecoder * decoder,
gst_ffmpegviddec_close (ffmpegdec);
}
gst_caps_replace (&ffmpegdec->last_caps, state->caps);
/* set buffer functions */
ffmpegdec->context->get_buffer = gst_ffmpegviddec_get_buffer;
ffmpegdec->context->reget_buffer = gst_ffmpegviddec_reget_buffer;