mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-03-07 04:57:57 +00:00
avcodec/mediacodecenc: Remove write only variable
Signed-off-by: Zhao Zhili <zhilizhao@tencent.com>
This commit is contained in:
parent
a5a3788f56
commit
3cfea6993a
@ -352,9 +352,7 @@ bailout:
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int mediacodec_receive(AVCodecContext *avctx,
|
||||
AVPacket *pkt,
|
||||
int *got_packet)
|
||||
static int mediacodec_receive(AVCodecContext *avctx, AVPacket *pkt)
|
||||
{
|
||||
MediaCodecEncContext *s = avctx->priv_data;
|
||||
FFAMediaCodec *codec = s->codec;
|
||||
@ -400,7 +398,7 @@ static int mediacodec_receive(AVCodecContext *avctx,
|
||||
memcpy(s->extradata, out_buf + out_info.offset, out_info.size);
|
||||
ff_AMediaCodec_releaseOutputBuffer(codec, index, false);
|
||||
// try immediately
|
||||
return mediacodec_receive(avctx, pkt, got_packet);
|
||||
return mediacodec_receive(avctx, pkt);
|
||||
}
|
||||
|
||||
ret = ff_get_encode_buffer(avctx, pkt, out_info.size + s->extradata_size, 0);
|
||||
@ -419,7 +417,6 @@ static int mediacodec_receive(AVCodecContext *avctx,
|
||||
if (out_info.flags & ff_AMediaCodec_getBufferFlagKeyFrame(codec))
|
||||
pkt->flags |= AV_PKT_FLAG_KEY;
|
||||
ret = 0;
|
||||
*got_packet = 1;
|
||||
|
||||
av_log(avctx, AV_LOG_TRACE, "receive packet pts %" PRId64 " dts %" PRId64
|
||||
" flags %d extradata %d\n",
|
||||
@ -510,7 +507,6 @@ static int mediacodec_encode(AVCodecContext *avctx, AVPacket *pkt)
|
||||
{
|
||||
MediaCodecEncContext *s = avctx->priv_data;
|
||||
int ret;
|
||||
int got_packet = 0;
|
||||
|
||||
// Return on three case:
|
||||
// 1. Serious error
|
||||
@ -525,7 +521,7 @@ static int mediacodec_encode(AVCodecContext *avctx, AVPacket *pkt)
|
||||
return ret;
|
||||
}
|
||||
|
||||
ret = mediacodec_receive(avctx, pkt, &got_packet);
|
||||
ret = mediacodec_receive(avctx, pkt);
|
||||
if (s->bsf) {
|
||||
if (!ret || ret == AVERROR_EOF)
|
||||
ret = av_bsf_send_packet(s->bsf, pkt);
|
||||
|
Loading…
Reference in New Issue
Block a user