vtenc: Instead of crashing if no corresponding frame is found, ignore this

... and hope that everything will be fine. This shouldn't really happen but
previously happened during shutdown. It should be fixed in videoencoder now,
but better be on the safe side here.
This commit is contained in:
Sebastian Dröge 2014-12-22 11:49:08 +01:00
parent a2d31cc59b
commit 568da160cb

View file

@ -1253,6 +1253,11 @@ gst_vtenc_enqueue_buffer (void *outputCallbackRefCon,
gst_video_encoder_get_frame (GST_VIDEO_ENCODER_CAST (self),
GPOINTER_TO_INT (sourceFrameRefCon));
if (!frame) {
GST_WARNING_OBJECT (self, "No corresponding frame found!");
goto beach;
}
if (is_keyframe) {
GST_VIDEO_CODEC_FRAME_SET_SYNC_POINT (frame);
gst_vtenc_clear_cached_caps_downstream (self);