1
0
mirror of https://github.com/mpv-player/mpv synced 2025-03-07 22:57:42 +00:00
mpv/common
wm4 98e7b4e538 av_common: always make sure to return a valid timebase
av_reduce(&num, &den, 1, 14112000, 1000000) can return num=0, den=1.
This means a 1/14112000 timebase (as used by the mp3 demuxer) would
become invalid.

The intention of mp_get_codec_timebase() is to always return a valid
timebase. av_reduce() probably does the logically correct thing - so add
a fallback to the safe default timebase.

Also, increase the av_reduce() parameter to INT_MAX. Let's just pray
this doesn't cause any actual problems. libavformat does the same, but
might be in a different position due to using av_rescale() etc., while
we convert between fractional timestamps and floats.
2016-11-10 12:06:17 +01:00
..
av_common.c av_common: always make sure to return a valid timebase 2016-11-10 12:06:17 +01:00
av_common.h ad_lavc, vd_lavc: fix a recent libavcodec deprecation warning 2016-10-17 19:18:03 +02:00
av_log.c
av_log.h
codecs.c
codecs.h
common.c
common.h
encode_lavc.c client API: more or less deprecate mpv_set_option() 2016-09-21 17:35:00 +02:00
encode_lavc.h
encode.h
global.h
msg_control.h player: make --log-file and --dump-stats freely settable at runtime 2016-09-19 19:56:40 +02:00
msg.c msg: flush after every message for --log-file 2016-09-30 14:55:59 +02:00
msg.h
playlist.c
playlist.h
tags.c
tags.h
version.c