diff options
author | Anton Khirnov <anton@khirnov.net> | 2023-01-04 17:27:07 +0100 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2023-01-29 09:23:17 +0100 |
commit | c44a3dba9eaebc200c2cf9e4cb30c20c2ebd4562 (patch) | |
tree | 9bd968dc98b24ccad7e234f8590c282d5ec0a1a0 /libavcodec/mpeg12enc.c | |
parent | 8a60a9c74c7bfc2772a67d13401a395fe01d5677 (diff) | |
download | ffmpeg-c44a3dba9eaebc200c2cf9e4cb30c20c2ebd4562.tar.gz |
lavc/mpegvideo_enc: handle frame durations and AV_CODEC_CAP_ENCODER_REORDERED_OPAQUE
For delay-capable encoders, i.e. mpeg12 and mpeg4video. Generic code in
encode.c already handles this for all other mpegvideo encoders.
Diffstat (limited to 'libavcodec/mpeg12enc.c')
-rw-r--r-- | libavcodec/mpeg12enc.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/libavcodec/mpeg12enc.c b/libavcodec/mpeg12enc.c index a6663a158b..b5951e4307 100644 --- a/libavcodec/mpeg12enc.c +++ b/libavcodec/mpeg12enc.c @@ -1246,7 +1246,8 @@ const FFCodec ff_mpeg1video_encoder = { .p.supported_framerates = ff_mpeg12_frame_rate_tab + 1, .p.pix_fmts = (const enum AVPixelFormat[]) { AV_PIX_FMT_YUV420P, AV_PIX_FMT_NONE }, - .p.capabilities = AV_CODEC_CAP_DELAY | AV_CODEC_CAP_SLICE_THREADS, + .p.capabilities = AV_CODEC_CAP_DELAY | AV_CODEC_CAP_SLICE_THREADS | + AV_CODEC_CAP_ENCODER_REORDERED_OPAQUE, .caps_internal = FF_CODEC_CAP_INIT_CLEANUP, .p.priv_class = &mpeg1_class, }; @@ -1264,7 +1265,8 @@ const FFCodec ff_mpeg2video_encoder = { .p.pix_fmts = (const enum AVPixelFormat[]) { AV_PIX_FMT_YUV420P, AV_PIX_FMT_YUV422P, AV_PIX_FMT_NONE }, - .p.capabilities = AV_CODEC_CAP_DELAY | AV_CODEC_CAP_SLICE_THREADS, + .p.capabilities = AV_CODEC_CAP_DELAY | AV_CODEC_CAP_SLICE_THREADS | + AV_CODEC_CAP_ENCODER_REORDERED_OPAQUE, .caps_internal = FF_CODEC_CAP_INIT_CLEANUP, .p.priv_class = &mpeg2_class, }; |