[vlc-devel] [RFC 1/2] avcodec: encoder: Always provide frame dimension and pixel format

Vittorio Giovara vittorio.giovara at gmail.com
Tue Mar 29 17:27:01 CEST 2016


On Tue, Mar 29, 2016 at 2:28 PM, Hugo Beauzée-Luyssen <hugo at beauzee.fr> wrote:
> On 03/29/2016 01:34 PM, Vittorio Giovara wrote:
>>
>> On Mon, Mar 28, 2016 at 2:28 PM, Hugo Beauzée-Luyssen <hugo at beauzee.fr>
>> wrote:
>>>
>>> av_frame_unref will clear most of the frame fields, including dimension
>>> & pixel format.
>>
>>
>> Where does that happen?
>>
>
> modules/codec/avcodec/encoder.c:1076 (EncodeVideo)
> -> libavutil/frame.c:306 (av_frame_unref)
> -> libavutil/frame.c:34 (get_frame_defaults)
> which memset the entire frame to 0, and explicitely sets the format to -1

I see, what happens if you *don't* call unref on the input avframe?

-- 
Vittorio


More information about the vlc-devel mailing list