vpxenc: Unref frame on ERROR

All code paths for handle_frame() must somehow take ownership of the frame, be
it by actually unreffing, forwarding the frame elsewhere or storing it for
later.

http://bugzilla.gnome.org/show_bug.cgi?id=760666
This commit is contained in:
Thibault Saunier 2016-01-19 22:49:20 +01:00 committed by Sebastian Dröge
parent d34910bf30
commit 01f995b8dd

View file

@ -1903,6 +1903,7 @@ gst_vpx_enc_handle_frame (GstVideoEncoder * video_encoder,
GST_ELEMENT_ERROR (encoder, LIBRARY, ENCODE,
("Failed to encode frame"), ("%s", gst_vpx_error_name (status)));
gst_video_codec_frame_set_user_data (frame, NULL, NULL);
gst_video_codec_frame_unref (frame);
return GST_FLOW_ERROR;
}