[libav-bugs] [Bug 970] New: Docs for avcodec_open2 aren't clear about cleanup.

bugzilla at libav.org bugzilla at libav.org
Sun Oct 9 03:36:37 CEST 2016


            Bug ID: 970
           Summary: Docs for avcodec_open2 aren't clear about cleanup.
           Product: Libav
           Version: 11
          Hardware: Other
                OS: Windows
            Status: NEW
          Severity: trivial
          Priority: ---
         Component: libavcodec
          Assignee: bugzilla at libav.org
          Reporter: jason.cipriani at gmail.com

The documentation for avcodec_open2 at
does not mention the necessity for cleanup with avcodec_close.

In normal cases this would imply that no action is necessary, however:

- The libav docs are generally vague and disjoint, leading to reasonable
suspicion, and
- avcodec_close exists as part of the public API, presumably for a reason.

This is a request to add a note along the lines of:

"In the typical sequence of avcodec_alloc_context3 -> avcodec_open2, the codec
need not be explicitly closed, as avcodec_close is called by

In addition, it is not actually clear whether or not avcodec_close needs to be
called in other cases; so a note about whether it does or doesn't ought to be
added as well.

Along these lines a note should probably be added to avcodec_free_context that
states that avcodec_close is implicitly called.

Or something. Anything to explicitly clear up the cleanup bit.

You are receiving this mail because:
You are watching all bug changes.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.libav.org/pipermail/libav-bugs/attachments/20161009/a3033092/attachment.html>

More information about the libav-bugs mailing list