video-converter: unpack into the destination when needed

Make sure we write into the destination line when we can propose the
dest allocator.
This commit is contained in:
Wim Taymans 2014-11-06 15:30:02 +01:00
parent d148963c7a
commit da6f66e550

View file

@ -534,13 +534,16 @@ setup_allocators (GstVideoConverter * convert)
{ {
GstLineCache *cache; GstLineCache *cache;
GstLineCacheAllocLineFunc alloc_line; GstLineCacheAllocLineFunc alloc_line;
gboolean alloc_writable = FALSE; gboolean alloc_writable;
/* start with using dest lines if we can directly write into it */ /* start with using dest lines if we can directly write into it */
if (convert->identity_pack) if (convert->identity_pack) {
alloc_line = get_dest_line; alloc_line = get_dest_line;
else alloc_writable = TRUE;
} else {
alloc_line = get_border_temp_line; alloc_line = get_border_temp_line;
alloc_writable = FALSE;
}
/* now walk backwards, we try to write into the dest lines directly /* now walk backwards, we try to write into the dest lines directly
* and keep track if the source needs to be writable */ * and keep track if the source needs to be writable */