diff options
author | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2022-08-23 17:56:31 +0200 |
---|---|---|
committer | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2022-08-27 02:23:43 +0200 |
commit | 8e56e6b2be454b7f4f27110793bbf585649f111e (patch) | |
tree | 217c9ade5040e10726b3b3ce954804bd956614c1 /libavcodec | |
parent | e405298ebded794a4ad84222c56b6c0245530afc (diff) | |
download | ffmpeg-8e56e6b2be454b7f4f27110793bbf585649f111e.tar.gz |
avcodec/encode: Apply intra_only_flag for receive_packet-API, too
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/encode.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libavcodec/encode.c b/libavcodec/encode.c index bd66f138a3..9f413095e4 100644 --- a/libavcodec/encode.c +++ b/libavcodec/encode.c @@ -240,7 +240,6 @@ static int encode_simple_internal(AVCodecContext *avctx, AVPacket *avpkt) if (avctx->codec->type == AVMEDIA_TYPE_AUDIO) { avpkt->dts = avpkt->pts; } - avpkt->flags |= avci->intra_only_flag; } 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); } else ret = encode_simple_receive_packet(avctx, avpkt); + if (ret >= 0) + avpkt->flags |= avci->intra_only_flag; if (ret == AVERROR_EOF) avci->draining_done = 1; |