You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-15 14:13:16 +02:00
avcodec/encode: Apply intra_only_flag for receive_packet-API, too
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
This commit is contained in:
@@ -240,7 +240,6 @@ static int encode_simple_internal(AVCodecContext *avctx, AVPacket *avpkt)
|
|||||||
if (avctx->codec->type == AVMEDIA_TYPE_AUDIO) {
|
if (avctx->codec->type == AVMEDIA_TYPE_AUDIO) {
|
||||||
avpkt->dts = avpkt->pts;
|
avpkt->dts = avpkt->pts;
|
||||||
}
|
}
|
||||||
avpkt->flags |= avci->intra_only_flag;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (avci->draining && !got_packet)
|
if (avci->draining && !got_packet)
|
||||||
@@ -301,6 +300,8 @@ static int encode_receive_packet_internal(AVCodecContext *avctx, AVPacket *avpkt
|
|||||||
av_assert0(!avpkt->data || avpkt->buf);
|
av_assert0(!avpkt->data || avpkt->buf);
|
||||||
} else
|
} else
|
||||||
ret = encode_simple_receive_packet(avctx, avpkt);
|
ret = encode_simple_receive_packet(avctx, avpkt);
|
||||||
|
if (ret >= 0)
|
||||||
|
avpkt->flags |= avci->intra_only_flag;
|
||||||
|
|
||||||
if (ret == AVERROR_EOF)
|
if (ret == AVERROR_EOF)
|
||||||
avci->draining_done = 1;
|
avci->draining_done = 1;
|
||||||
|
Reference in New Issue
Block a user