Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJack Bruienne <jackbruienne@gmail.com>2022-06-26 18:04:42 +0300
committerPaul B Mahol <onemda@gmail.com>2022-06-26 18:04:42 +0300
commit75638fe9402f70645bdde4d95672fa640a327300 (patch)
tree5dc7fd93ff91c75178af3d16bfa326c70422086f /libavcodec/utils.c
parent9dfec90253787e718b2771fd93528381d5407721 (diff)
avcodec: fix time reporting for DFPWM streams
This adds the exact bits per sample for DFPWM to av_get_exact_bits_per_sample. Previously, the DTS and PTS were set to 0 because the codec never reported them, but adding this allows libavformat to automatically set DTS and PTS from the byte position of the stream. Signed-off-by: Jack Bruienne <jackbruienne@gmail.com>
Diffstat (limited to 'libavcodec/utils.c')
-rw-r--r--libavcodec/utils.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libavcodec/utils.c b/libavcodec/utils.c
index eb7e505a62..940f25fe7a 100644
--- a/libavcodec/utils.c
+++ b/libavcodec/utils.c
@@ -495,6 +495,8 @@ const char *avcodec_profile_name(enum AVCodecID codec_id, int profile)
int av_get_exact_bits_per_sample(enum AVCodecID codec_id)
{
switch (codec_id) {
+ case AV_CODEC_ID_DFPWM:
+ return 1;
case AV_CODEC_ID_8SVX_EXP:
case AV_CODEC_ID_8SVX_FIB:
case AV_CODEC_ID_ADPCM_ARGO: