videoscale: improve handling of navigation events

Only make the navigation event writable when we need to change it.
This commit is contained in:
Wim Taymans 2012-09-11 10:56:43 +02:00
parent d186109e71
commit 280e504ae5

View file

@ -1412,6 +1412,8 @@ gst_video_scale_src_event (GstBaseTransform * trans, GstEvent * event)
switch (GST_EVENT_TYPE (event)) {
case GST_EVENT_NAVIGATION:
if (filter->in_info.width != filter->out_info.width ||
filter->in_info.height != filter->out_info.height) {
event =
GST_EVENT (gst_mini_object_make_writable (GST_MINI_OBJECT (event)));
@ -1424,6 +1426,7 @@ gst_video_scale_src_event (GstBaseTransform * trans, GstEvent * event)
gst_structure_set (structure, "pointer_y", G_TYPE_DOUBLE,
a * filter->in_info.height / filter->out_info.height, NULL);
}
}
break;
default:
break;