1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-02-04 06:08:26 +02:00
FFmpeg/libavcodec
James Almer a4a3fd814a 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>
2021-09-12 11:22:04 +02:00
..
2021-09-11 21:23:49 +02:00
2020-07-03 00:03:44 +02:00
2021-09-11 21:23:48 +02:00
2017-10-03 19:47:37 -03:00
2019-11-14 23:30:37 +01:00
2017-07-07 15:23:58 -04:00
2017-05-08 12:30:09 +02:00
2021-09-11 21:23:48 +02:00
2018-06-18 01:16:03 +02:00
2017-07-07 15:29:57 -04:00
2019-11-15 12:25:45 +01:00
2020-07-02 19:55:09 +02:00
2017-10-03 19:47:37 -03:00
2018-06-18 01:16:04 +02:00
2021-09-11 21:23:49 +02:00
2017-05-23 15:25:11 +02:00
2017-09-16 19:55:03 +02:00
2019-11-15 12:25:46 +01:00
2017-08-30 12:13:01 +02:00
2020-07-02 19:55:09 +02:00
2017-07-12 20:36:13 +02:00
2019-11-14 23:30:37 +01:00
2017-10-03 19:47:37 -03:00
2017-10-03 19:47:37 -03:00
2017-08-11 04:28:52 +02:00
2019-03-24 10:38:51 +01:00
2019-11-15 12:25:45 +01:00
2021-09-11 21:23:49 +02:00
2020-07-02 19:55:09 +02:00
2017-09-28 22:41:08 +01:00
2017-08-18 17:18:32 +01:00
2017-07-20 08:24:46 +01:00
2017-07-07 15:26:35 -04:00
2020-07-03 00:03:44 +02:00
2020-07-02 19:55:10 +02:00
2021-09-11 21:23:48 +02:00
2020-07-02 19:55:09 +02:00
2017-08-07 13:09:41 +02:00
2020-07-02 19:55:09 +02:00
2017-07-26 06:13:05 +07:00
2017-07-11 13:22:02 +07:00
2017-10-11 02:15:21 +02:00
2019-11-15 12:25:45 +01:00
2017-07-01 12:03:34 -03:00
2017-09-22 01:33:22 +02:00
2018-06-18 01:16:03 +02:00
2021-09-11 21:23:48 +02:00
2019-11-14 23:30:37 +01:00
2021-09-11 21:23:48 +02:00
2017-05-25 14:30:04 +02:00
2020-07-03 00:03:45 +02:00
2019-11-15 12:25:47 +01:00
2017-10-04 23:14:37 +01:00
2019-03-24 10:38:51 +01:00
2017-07-14 02:30:37 +02:00
2017-07-14 02:30:37 +02:00
2019-11-15 12:25:46 +01:00
2019-11-15 12:25:45 +01:00
2019-11-15 12:25:45 +01:00
2019-11-15 12:25:45 +01:00
2017-09-22 01:33:22 +02:00
2017-10-03 19:47:37 -03:00
2017-07-24 17:52:42 +02:00
2019-03-24 10:38:51 +01:00