fixup! lavc/rkmppenc: add RKMPP H264 and HEVC encoder

fix packet deinit too early.

Signed-off-by: nyanmisaka <nst799610810@gmail.com>
This commit is contained in:
nyanmisaka 2024-11-14 14:43:52 +08:00
parent 841da94b13
commit 9dbaf5a69d

View file

@ -810,7 +810,6 @@ static int rkmpp_get_packet(AVCodecContext *avctx, AVPacket *packet, int timeout
ret = AVERROR_EXTERNAL;
goto exit;
}
mpp_packet_deinit(&mpp_pkt);
mpp_meta_get_s32(mpp_meta, KEY_OUTPUT_INTRA, &key_frame);
if (key_frame)
@ -830,6 +829,7 @@ static int rkmpp_get_packet(AVCodecContext *avctx, AVPacket *packet, int timeout
mpp_buffer_set_index(mpp_buf, -1);
clear_unused_frames(r->frame_list);
mpp_packet_deinit(&mpp_pkt);
return 0;
exit: