vpxdec: libvpx's release buffer is sometimes called with fb->priv==NULL

Don't assert on this but just ignore these cases.
This commit is contained in:
Sebastian Dröge 2016-11-22 20:33:29 +02:00
parent 5d4c71d76e
commit ae2dd54a24

View file

@ -482,9 +482,12 @@ gst_vpx_dec_release_buffer_cb (gpointer priv, vpx_codec_frame_buffer_t * fb)
{
struct Frame *frame = fb->priv;
/* We're sometimes called without a frame */
if (!frame)
return 0;
GST_TRACE_OBJECT (priv, "Release buffer %p", frame->buffer);
g_assert (frame);
gst_buffer_unmap (frame->buffer, &frame->info);
gst_buffer_unref (frame->buffer);
g_free (frame);