Skip to content

Add UniqueAVDictionary class and utilize it in VideoEncoder #1053

@Dan-Flores

Description

@Dan-Flores

In #1050, VideoEncoder is updated to use raw AVDictionary pointers (avFormatOptions_, avCodecOptions) and manual calls to av_dict_free() to clean up those objects.

void sortCodecOptions(
    const std::map<std::string, std::string>& extraOptions,
    AVDictionary** codecDict,
    AVDictionary** formatDict)
. . .
av_dict_free(&avCodecOptions);

We should create a UniqueAVDictionary wrapper class (similar to existing UniqueAVFrame) that automatically manages the AVDictionary objects using the RAII pattern, then refactor VideoEncoder to use UniqueAVDictionary and remove manual cleanup calls.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions