if (gst_query_get_n_allocation_pools (query) > 0) {
gst_query_parse_nth_allocation_pool (query, 0, &pool, &size, &min, &max);
+ if (!pool)
+ gst_query_parse_allocation (query, &outcaps, NULL);
+
update_pool = TRUE;
} else {
GstVideoInfo vinfo;
out_map_flags |= GST_VIDEO_FRAME_MAP_FLAG_NO_REF;
if (!gst_video_frame_map (&out_frame, &filter->out_info, outbuf,
- out_map_flags))
+ out_map_flags)) {
+ gst_video_frame_unmap (&in_frame);
goto invalid_buffer;
+ }
#else
if (!gst_video_frame_map (&out_frame, &filter->out_info, outbuf,
- GST_MAP_WRITE | GST_VIDEO_FRAME_MAP_FLAG_NO_REF))
+ GST_MAP_WRITE | GST_VIDEO_FRAME_MAP_FLAG_NO_REF)) {
+ gst_video_frame_unmap (&in_frame);
goto invalid_buffer;
+ }
#endif
res = fclass->transform_frame (filter, &in_frame, &out_frame);