diff options
author | James Almer <jamrial@gmail.com> | 2021-07-21 01:02:44 -0300 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2021-09-08 23:12:50 +0200 |
commit | 07dec5b0c383ebd6053bdf0a022dfe4aa01b9b70 (patch) | |
tree | 2ca70f3a48ba37613c44501b467056b9785f018a /libavformat/avlanguage.c | |
parent | 620fa723b8f797aabae67419ddc49b3577a00a64 (diff) | |
download | ffmpeg-07dec5b0c383ebd6053bdf0a022dfe4aa01b9b70.tar.gz |
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 <jamrial@gmail.com>
(cherry picked from commit e01d306c647b5827102260b885faa223b646d2d1)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavformat/avlanguage.c')
0 files changed, 0 insertions, 0 deletions