Commit b86af93c authored by James Almer's avatar James Almer

avcodec/mfenc: use AVCodecContext.get_encode_buffer()

Signed-off-by: 's avatarJames Almer <jamrial@gmail.com>
parent d51a6884
...@@ -243,7 +243,7 @@ static int mf_sample_to_avpacket(AVCodecContext *avctx, IMFSample *sample, AVPac ...@@ -243,7 +243,7 @@ static int mf_sample_to_avpacket(AVCodecContext *avctx, IMFSample *sample, AVPac
if (FAILED(hr)) if (FAILED(hr))
return AVERROR_EXTERNAL; return AVERROR_EXTERNAL;
if ((ret = av_new_packet(avpkt, len)) < 0) if ((ret = ff_get_encode_buffer(avctx, avpkt, len, 0)) < 0)
return ret; return ret;
IMFSample_ConvertToContiguousBuffer(sample, &buffer); IMFSample_ConvertToContiguousBuffer(sample, &buffer);
...@@ -1163,7 +1163,8 @@ static int mf_close(AVCodecContext *avctx) ...@@ -1163,7 +1163,8 @@ static int mf_close(AVCodecContext *avctx)
.close = mf_close, \ .close = mf_close, \
.receive_packet = mf_receive_packet, \ .receive_packet = mf_receive_packet, \
EXTRA \ EXTRA \
.capabilities = AV_CODEC_CAP_DELAY | AV_CODEC_CAP_HYBRID, \ .capabilities = AV_CODEC_CAP_DELAY | AV_CODEC_CAP_HYBRID | \
AV_CODEC_CAP_DR1, \
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | \ .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | \
FF_CODEC_CAP_INIT_CLEANUP, \ FF_CODEC_CAP_INIT_CLEANUP, \
}; };
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment