[FFmpeg-devel] [PATCH v2] avcodec/mfenc: set variable frame size flag.
Andreas Rheinhardt
andreas.rheinhardt at outlook.com
Sun Jun 19 12:24:43 EEST 2022
Andreas Rheinhardt:
> Gyan Doshi:
>> Default avctx->frame_size is 0 which led to init failure for
>> audio MediaFoundation encoders since 827d6fe73d.
>>
>> The MF audio encoders accept variable frame size input buffers.
>>
>> Fixes #9802
>> ---
>> libavcodec/mfenc.c | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/libavcodec/mfenc.c b/libavcodec/mfenc.c
>> index 13ed7b3e11..8618e54ea3 100644
>> --- a/libavcodec/mfenc.c
>> +++ b/libavcodec/mfenc.c
>> @@ -1239,7 +1239,7 @@ static int mf_init(AVCodecContext *avctx)
>> FF_CODEC_RECEIVE_PACKET_CB(mf_receive_packet), \
>> EXTRA \
>> .p.capabilities = AV_CODEC_CAP_DELAY | AV_CODEC_CAP_HYBRID | \
>> - AV_CODEC_CAP_DR1, \
>> + AV_CODEC_CAP_DR1 | AV_CODEC_CAP_VARIABLE_FRAME_SIZE, \
>> .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | \
>> FF_CODEC_CAP_INIT_CLEANUP, \
>> };
>
> This will add this capability to both audio and video encoders, although
> it makes no sense for the latter.
>
This should actually been covered by the libavcodec-avcodec FATE test.
How did you test your patch?
- Andreas
More information about the ffmpeg-devel
mailing list