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

Hugo Beauzée-Luyssen hugo at beauzee.fr
Tue Mar 29 14:28:36 CEST 2016

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

>> This causes some encoders (at least the raw encoder) to
>> reject the frame.
> Some encoders or the raw encoder exclusively? If the latter, a bug in
> the lavc encoder seems more likely.

I'll need to write a sample to run more tests and be able to reply to this


More information about the vlc-devel mailing list