Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sync 2.0 with 1.9.23-202310190849 #427

Merged
merged 35 commits into from
Nov 2, 2023

Conversation

StudioMaX
Copy link
Collaborator

No description provided.

StudioMaX and others added 30 commits October 26, 2022 19:04
…ions-checkout

Update actions/checkout to v3 and upgrade PHPStan
Remove deprecated utf8_encode/utf8_decode
* Add getid3_lib::SafeDiv() which does a division with ternary guard.
  Avoids repeating the denominator expression.
* Rearrange a few formulas to avoid unnecessary divisions.
  a/(b/c) = a*c/b except that the latter produces an answer when c=0.
* Remediate divisions that may possibly divide by zero, or look
  suspicious.
* In module.audio.midi.php: remove unused variable
* In module.audio.mp3.php: raise an error for zero channels, since lots
  of things divide by the channel count.
* In module.audio.voc.php: ignore channels=0, pretend channels=1
* In module.graphic.bmp.php: with ExtractData the RLE modes will divide
  by zero if width=0. With any compression mode, zero width or height
  means empty data, so add that as a shortcut.
The reciprocal of the actual value was being returned for MPEG-1
video. Files with square pixels were not affected, nor were MPEG-2
files listing a display aspect ratio.

Fixes JamesHeinrich#410
This gives a nice 320px result instead of 321 point something
when producing square pixel output and is commonly used.
Getting this warning:

Binary operation "/" between 1 and 0.0|0.6735|0.7031|0.7615|0.8055|0.8437|0.8935|0.91666666666667|0.9815|1.0|1.0255|1.0695|1.1|1.1575|1.2015|1.3333|1.7778|2.21 results in an error.

Hopefully this will convince it that it won't divide by zero?
Fix for MPEG-1 video pixel aspect ratio
It seems confused by the guard for $ratio being 0 :)
One more attempt to please the static analyzer
clarify wording that new gCL licenses no longer available
JamesHeinrich and others added 5 commits September 1, 2023 11:07
…l_in_favor_of_static_property

Moves jpeg segments names from $GLOBALS to class static property
Fix PHP Notice in module.audio-video.riff.php
# Conflicts:
#	README.md
#	getid3/module.audio-video.matroska.php
#	license.txt
#	phpstan.neon
#	src/GetID3.php
#	src/Module/Audio/Shorten.php
#	src/Module/Audio/module.archive.7zip.php
#	src/Module/AudioVideo/QuickTime.php
#	src/Module/Graphic/Bmp.php
#	src/Write/ID3v2.php
@StudioMaX StudioMaX merged commit e1450a6 into JamesHeinrich:2.0 Nov 2, 2023
23 checks passed
@StudioMaX StudioMaX deleted the 2.0-with-1.9.23-202310190849 branch November 2, 2023 19:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants