mirror of
https://github.com/nyanmisaka/ffmpeg-rockchip.git
synced 2026-01-23 18:10:56 +01:00
fixup! lavc/rkmppenc: add RKMPP H264 and HEVC encoder
switch from ff_alloc_packet() to ff_get_encode_buffer(). Signed-off-by: nyanmisaka <nst799610810@gmail.com>
This commit is contained in:
parent
22959a8080
commit
841da94b13
1 changed files with 2 additions and 2 deletions
|
|
@ -792,8 +792,8 @@ static int rkmpp_get_packet(AVCodecContext *avctx, AVPacket *packet, int timeout
|
|||
{
|
||||
size_t mpp_pkt_length = mpp_packet_get_length(mpp_pkt);
|
||||
|
||||
if ((ret = ff_alloc_packet(avctx, packet, mpp_pkt_length)) < 0) {
|
||||
av_log(avctx, AV_LOG_ERROR, "ff_alloc_packet failed: %d\n", ret);
|
||||
if ((ret = ff_get_encode_buffer(avctx, packet, mpp_pkt_length, 0)) < 0) {
|
||||
av_log(avctx, AV_LOG_ERROR, "ff_get_encode_buffer failed: %d\n", ret);
|
||||
goto exit;
|
||||
}
|
||||
memcpy(packet->data, mpp_packet_get_data(mpp_pkt), mpp_pkt_length);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue