• wm4's avatar
    AVFrame: add an opaque_ref field · e3af49b1
    wm4 authored
    This is an extended version of the AVFrame.opaque field, which can be
    used to attach arbitrary user information to an AVFrame.
    
    The usefulness of the opaque field is rather limited, because it can
    store only up to 32 bits of information (or 64 bit on 64 bit systems).
    It's not possible to set this field to a memory allocation, because
    there is no way to deallocate it correctly.
    
    The opaque_ref field circumvents this by letting the user set an
    AVBuffer, which makes the user data refcounted.
    Signed-off-by: 's avatarAnton Khirnov <anton@khirnov.net>
    
    Merges Libav commit 04f3bd34.
    e3af49b1
frame.c 22.4 KB