scenechange: fix crash on startup

gst_video_frame_map() was using the oldinfo GstVideoInfo
before it's been populated, resulting in a crash right
at the start.

https://bugzilla.gnome.org/show_bug.cgi?id=734763
This commit is contained in:
Vineeth T M 2014-08-14 10:19:13 +05:30 committed by Tim-Philipp Müller
parent 8f25220b9c
commit 8caf5b7360

View file

@ -184,6 +184,7 @@ gst_scene_change_transform_frame_ip (GstVideoFilter * filter,
scenechange->n_diffs = 0;
memset (scenechange->diffs, 0, sizeof (double) * SC_N_DIFFS);
scenechange->oldbuf = gst_buffer_ref (frame->buffer);
memcpy (&scenechange->oldinfo, &frame->info, sizeof (GstVideoInfo));
return GST_FLOW_OK;
}