diff options
author | James Almer <[email protected]> | 2021-07-21 01:02:44 -0300 |
---|---|---|
committer | Michael Niedermayer <[email protected]> | 2021-09-12 11:22:04 +0200 |
commit | a4a3fd814aac900175ec4a2811cb5bf98c1ddad3 (patch) | |
tree | cf18ceaa7adf374df16031b6ee119f1250f41121 /doc/examples/encode_audio.c | |
parent | 0fe497d79581ff9e3c3eb18dc9d0265686933bb0 (diff) |
avcodec/utils: don't return negative values in av_get_audio_frame_duration()
In some extrme cases, like with adpcm_ms samples with an extremely high channel
count, get_audio_frame_duration() may return a negative frame duration value.
Don't propagate it, and instead return 0, signaling that a duration could not
be determined.
Fixes ticket #9312
Signed-off-by: James Almer <[email protected]>
(cherry picked from commit e01d306c647b5827102260b885faa223b646d2d1)
Signed-off-by: Michael Niedermayer <[email protected]>
Diffstat (limited to 'doc/examples/encode_audio.c')
0 files changed, 0 insertions, 0 deletions