Ensure that only decode() callback ones set it.
Showing the changes to libavcodec/tests/avcodec.c (1 of 1 file). Show all
Unified · Split
| @@ -175,6 +175,10 @@ int main(void){ · 174 unmodified lines | |||
| 175 | !(codec->capabilities & AV_CODEC_CAP_FRAME_THREADS)) | 175 | !(codec->capabilities & AV_CODEC_CAP_FRAME_THREADS)) |
| 176 | ERR("Decoder %s wants allocated progress without supporting" | 176 | ERR("Decoder %s wants allocated progress without supporting" |
| 177 | "frame threads\n"); | 177 | "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"); | ||
| 178 | } | 182 | } |
| 179 | if (priv_data_size_wrong(codec2)) | 183 | if (priv_data_size_wrong(codec2)) |
| 180 | ERR_EXT("Private context of codec %s is impossibly-sized (size %d).", | 184 | ERR_EXT("Private context of codec %s is impossibly-sized (size %d).", |