aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec
diff options
context:
space:
mode:
authorJames Almer <jamrial@gmail.com>2023-07-09 16:19:09 -0300
committerJames Almer <jamrial@gmail.com>2023-07-11 14:26:43 -0300
commit2bbb6cf74eb8db58f2e1cbb862434f7ec8f9e95d (patch)
treefa2340f6d23aacab49b7c32b760832aaa83d759a /libavcodec
parent31ae95d988027a61922d47da622bc17357b49af2 (diff)
downloadffmpeg-2bbb6cf74eb8db58f2e1cbb862434f7ec8f9e95d.tar.gz
avcodec/test/avcodec: check decoders for FF_CODEC_CAP_SETS_PKT_DTS
Ensure that only decode() callback ones set it. Signed-off-by: James Almer <jamrial@gmail.com>
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/tests/avcodec.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/libavcodec/tests/avcodec.c b/libavcodec/tests/avcodec.c
index bbf5289af2..08ca507bf0 100644
--- a/libavcodec/tests/avcodec.c
+++ b/libavcodec/tests/avcodec.c
@@ -175,6 +175,10 @@ int main(void){
!(codec->capabilities & AV_CODEC_CAP_FRAME_THREADS))
ERR("Decoder %s wants allocated progress without supporting"
"frame threads\n");
+ if (codec2->cb_type != FF_CODEC_CB_TYPE_DECODE &&
+ codec2->caps_internal & FF_CODEC_CAP_SETS_PKT_DTS)
+ ERR("Decoder %s is marked as setting pkt_dts when it doesn't have"
+ "any effect\n");
}
if (priv_data_size_wrong(codec2))
ERR_EXT("Private context of codec %s is impossibly-sized (size %d).",