History

avcodec/test/avcodec: check decoders for FF_CODEC_CAP_SETS_PKT_DTS

Ensure that only decode() callback ones set it.

James Almer committed 3 years ago

Commit 2bbb6cf1 parent 31ae95d1 file · +4 −0Browse files

Unified · Split

libavcodec/tests/avcodec.c+4−0
@@ -175,6 +175,10 @@ int main(void){ · 174 unmodified lines
175175 !(codec->capabilities & AV_CODEC_CAP_FRAME_THREADS))
176176 ERR("Decoder %s wants allocated progress without supporting"
177177 "frame threads\n");
178+ if (codec2->cb_type != FF_CODEC_CB_TYPE_DECODE &&
179+ codec2->caps_internal & FF_CODEC_CAP_SETS_PKT_DTS)
180+ ERR("Decoder %s is marked as setting pkt_dts when it doesn't have"
181+ "any effect\n");
178182 }
179183 if (priv_data_size_wrong(codec2))
180184 ERR_EXT("Private context of codec %s is impossibly-sized (size %d).",

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t