[FFmpeg-trac] #5027(avcodec:new): avcodec_free_context frees extradata

FFmpeg trac at avcodec.org
Mon Nov 23 07:19:15 CET 2015


#5027: avcodec_free_context frees extradata
-------------------------------------+-----------------------------------
             Reporter:  jyavenard    |                    Owner:
                 Type:  defect       |                   Status:  new
             Priority:  normal       |                Component:  avcodec
              Version:  unspecified  |               Resolution:
             Keywords:               |               Blocked By:
             Blocking:               |  Reproduced by developer:  0
Analyzed by developer:  0            |
-------------------------------------+-----------------------------------

Comment (by squelart):

 Since the code has been there for a while, I think the best first move
 would be to update the documentation to at least match the current
 implementation, i.e.: 'extradata' (when decoding) is owned by the user
 *except* when using avcodec_free_context; the user should reset the
 pointer beforehand if they do not want their extradata to be destroyed.

 But I agree with jyavenard that a replacement API avcodec_free_context2
 that respects the external ownership of extradata would be more consistent
 with the documentation and other functions.

--
Ticket URL: <https://trac.ffmpeg.org/ticket/5027#comment:2>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker


More information about the FFmpeg-trac mailing list