Fix MppPacket being released before MppMeta

The lifecycle of MppMeta is bound to MppPacket, which was ignored
in the previous fix. This will cause an error to be thrown when
multiple encoding instances are used.

Signed-off-by: nyanmisaka <nst799610810@gmail.com>
This commit is contained in:
nyanmisaka 2024-11-14 14:53:16 +08:00
parent af68c43fd5
commit f390f9b154

View File

@ -2714,7 +2714,6 @@ Index: FFmpeg/libavcodec/rkmppenc.c
+ ret = AVERROR_EXTERNAL;
+ goto exit;
+ }
+ mpp_packet_deinit(&mpp_pkt);
+
+ mpp_meta_get_s32(mpp_meta, KEY_OUTPUT_INTRA, &key_frame);
+ if (key_frame)
@ -2734,6 +2733,7 @@ Index: FFmpeg/libavcodec/rkmppenc.c
+ mpp_buffer_set_index(mpp_buf, -1);
+ clear_unused_frames(r->frame_list);
+
+ mpp_packet_deinit(&mpp_pkt);
+ return 0;
+
+exit: