• Vittorio Giovara's avatar
    Gather all coded_frame allocations and free functions to a single place · d6604b29
    Vittorio Giovara authored
    Allocating coded_frame is what most encoders do anyway, so it makes
    sense to always allocate and free it in a single place. Moreover a lot
    of encoders freed the frame with av_freep() instead of the correct API
    av_frame_free().
    
    This bring uniformity to encoder behaviour and prevents applications
    from erroneusly accessing this field when not allocated. Additionally
    this helps isolating encoders that export information with coded_frame,
    and heavily simplifies its deprecation.
    Signed-off-by: 's avatarVittorio Giovara <vittorio.giovara@gmail.com>
    d6604b29
pcm.c 19.8 KB