mirror of
https://github.com/nyanmisaka/ffmpeg-rockchip.git
synced 2026-04-22 23:17:48 +08:00
fixup! lavc/rkmppenc: add RKMPP H264 and HEVC encoder
use FF_CODEC_CAP_INIT_CLEANUP. Signed-off-by: nyanmisaka <nst799610810@gmail.com>
This commit is contained in:
@@ -1016,8 +1016,10 @@ static int rkmpp_get_packet(AVCodecContext *avctx, AVPacket *packet, int timeout
|
|||||||
}
|
}
|
||||||
|
|
||||||
mpp_buf = mpp_frame_get_buffer(mpp_frame);
|
mpp_buf = mpp_frame_get_buffer(mpp_frame);
|
||||||
if (!mpp_buf)
|
if (!mpp_buf) {
|
||||||
return AVERROR(ENOMEM);
|
ret = AVERROR(ENOMEM);
|
||||||
|
goto exit;
|
||||||
|
}
|
||||||
|
|
||||||
/* mark buffer as unused (idx < 0) */
|
/* mark buffer as unused (idx < 0) */
|
||||||
mpp_buffer_set_index(mpp_buf, -1);
|
mpp_buffer_set_index(mpp_buf, -1);
|
||||||
@@ -1296,7 +1298,6 @@ fail:
|
|||||||
if (mpp_pkt)
|
if (mpp_pkt)
|
||||||
mpp_packet_deinit(&mpp_pkt);
|
mpp_packet_deinit(&mpp_pkt);
|
||||||
|
|
||||||
rkmpp_encode_close(avctx);
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user