summaryrefslogtreecommitdiff
path: root/libavcodec/ffv1enc.c
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2023-01-25 16:39:01 +0100
committerAnton Khirnov <anton@khirnov.net>2023-01-29 09:14:13 +0100
commitd0c8ca961d7d4a496f212283781ba74623bf8c3f (patch)
tree226d47246979c08b55757bf3fd08c021aa362272 /libavcodec/ffv1enc.c
parente5e29eda5aae8eb5d1d32f647c68c0543db63217 (diff)
lavc: add a private cap for fake-delay encoders
Some encoders (ffv1, flac, adx) are marked with AV_CODEC_CAP_DELAY onky in order to be flushed at the end, otherwise they behave as no-delay encoders. Add a capability to mark these encoders. Use it for setting pts generically.
Diffstat (limited to 'libavcodec/ffv1enc.c')
-rw-r--r--libavcodec/ffv1enc.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/libavcodec/ffv1enc.c b/libavcodec/ffv1enc.c
index 0237ac48eb..6649ec7e88 100644
--- a/libavcodec/ffv1enc.c
+++ b/libavcodec/ffv1enc.c
@@ -1231,8 +1231,6 @@ static int encode_frame(AVCodecContext *avctx, AVPacket *pkt,
f->picture_number++;
pkt->size = buf_p - pkt->data;
- pkt->pts =
- pkt->dts = pict->pts;
pkt->flags |= AV_PKT_FLAG_KEY * f->key_frame;
*got_packet = 1;
@@ -1301,5 +1299,5 @@ const FFCodec ff_ffv1_encoder = {
},
.p.priv_class = &ffv1_class,
- .caps_internal = FF_CODEC_CAP_INIT_CLEANUP,
+ .caps_internal = FF_CODEC_CAP_INIT_CLEANUP | FF_CODEC_CAP_EOF_FLUSH,
};