[mythtv-commits] [MythTV/mythtv] 722462: fixup create mythrandom.h
Scott Theisen
noreply at github.com
Thu Apr 28 21:41:28 UTC 2022
Branch: refs/heads/master
Home: https://github.com/MythTV/mythtv
Commit: 722462d43fbeb40cca9157716062414d10dc8da0
https://github.com/MythTV/mythtv/commit/722462d43fbeb40cca9157716062414d10dc8da0
Author: ulmus-scott <scott.the.elm at gmail.com>
Date: 2022-04-28 (Thu, 28 Apr 2022)
Changed paths:
M mythtv/libs/libmythbase/mythrandom.cpp
M mythtv/libs/libmythbase/mythrandom.h
Log Message:
-----------
fixup create mythrandom.h
Commit: 97bc4089a3aa62617a73412811510d042e90c1d8
https://github.com/MythTV/mythtv/commit/97bc4089a3aa62617a73412811510d042e90c1d8
Author: ulmus-scott <scott.the.elm at gmail.com>
Date: 2022-04-28 (Thu, 28 Apr 2022)
Changed paths:
M mythtv/libs/libmythbase/mythrandom.h
Log Message:
-----------
mythrandom.h: put functions in inline namespace MythRandomQt
Commit: baeab688907c311c69f2e4e984cb9b713946fde5
https://github.com/MythTV/mythtv/commit/baeab688907c311c69f2e4e984cb9b713946fde5
Author: ulmus-scott <scott.the.elm at gmail.com>
Date: 2022-04-28 (Thu, 28 Apr 2022)
Changed paths:
M mythtv/libs/libmythtv/eitscanner.cpp
M mythtv/libs/libmythtv/eitscanner.h
Log Message:
-----------
eitscanner.h: remove '#include "mythrandom.h"' from header
It was only used for a private variable, so hide it in the constructor in the .cpp file.
This drastically reduces the recompilations needed when changing mythrandom.h.
Commit: a7baa1fa42e3019ec1c502bc893503618c1b051e
https://github.com/MythTV/mythtv/commit/a7baa1fa42e3019ec1c502bc893503618c1b051e
Author: ulmus-scott <scott.the.elm at gmail.com>
Date: 2022-04-28 (Thu, 28 Apr 2022)
Changed paths:
M mythtv/libs/libmythbase/mythrandom.h
Log Message:
-----------
mythrandom.h: add functions using C++ standard library <random>
Commit: ce37dc47c952599c81829873e030f2cc5c64b591
https://github.com/MythTV/mythtv/commit/ce37dc47c952599c81829873e030f2cc5c64b591
Author: ulmus-scott <scott.the.elm at gmail.com>
Date: 2022-04-28 (Thu, 28 Apr 2022)
Changed paths:
M mythtv/libs/libmythbase/mythrandom.h
Log Message:
-----------
mythrandom.h: remove export attribute from inline functions
mingw32 complains about it.
Commit: 4fe02c6e789c549bc08fa5741cfb6fe230b25afb
https://github.com/MythTV/mythtv/commit/4fe02c6e789c549bc08fa5741cfb6fe230b25afb
Author: ulmus-scott <scott.the.elm at gmail.com>
Date: 2022-04-28 (Thu, 28 Apr 2022)
Changed paths:
M mythtv/libs/libmythbase/http/mythwebsocket.cpp
M mythtv/libs/libmythbase/mythrandom.h
Log Message:
-----------
mythrandom.h: fix ambiguous overload
This forces the use of the unsigned overload, which technically may be a change.
However, we never actually request any negative numbers and most calls are of the form (0, x),
so this is functionally equivalent.
Commit: fc123684fe2fc66f3671c540a15934b60335d490
https://github.com/MythTV/mythtv/commit/fc123684fe2fc66f3671c540a15934b60335d490
Author: ulmus-scott <scott.the.elm at gmail.com>
Date: 2022-04-28 (Thu, 28 Apr 2022)
Changed paths:
M mythtv/libs/libmythtv/recorders/rtp/packetbuffer.cpp
Log Message:
-----------
packetbuffer.cpp: remove unused <cstdlib> // for random
The file uses mythrandom.h instead.
Add include <cstdint>, which is also transitively included by "mythrandom.h".
Commit: 6f40d18b8330fd28e3b671d8462b2d98e64a577b
https://github.com/MythTV/mythtv/commit/6f40d18b8330fd28e3b671d8462b2d98e64a577b
Author: ulmus-scott <scott.the.elm at gmail.com>
Date: 2022-04-28 (Thu, 28 Apr 2022)
Changed paths:
M mythtv/libs/libmythbase/bonjourregister.cpp
M mythtv/libs/libmythbase/http/mythwebsocket.cpp
M mythtv/libs/libmythbase/mythrandom.h
M mythtv/libs/libmythfreemheg/Programs.cpp
M mythtv/libs/libmythtv/AirPlay/mythairplayserver.cpp
M mythtv/libs/libmythtv/eitscanner.cpp
M mythtv/libs/libmythtv/recorders/rtp/packetbuffer.cpp
M mythtv/libs/libmythtv/test/test_copyframes/test_copyframes.cpp
M mythtv/libs/libmythtv/tv_rec.cpp
M mythtv/libs/libmythui/mythuitype.cpp
M mythtv/libs/libmythupnp/mmulticastsocketdevice.cpp
M mythtv/libs/libmythupnp/ssdp.cpp
M mythtv/libs/libmythupnp/upnptasknotify.cpp
M mythtv/libs/libmythupnp/upnptasksearch.cpp
M mythtv/programs/mythbackend/mainserver.cpp
M mythtv/programs/mythfrontend/playbackbox.cpp
M mythtv/programs/mythfrontend/videodlg.cpp
Log Message:
-----------
mythrandom: use C++ standard library instead of Qt
Commit: 9431903757144d15d90854b96f6b809d8b03c035
https://github.com/MythTV/mythtv/commit/9431903757144d15d90854b96f6b809d8b03c035
Author: ulmus-scott <scott.the.elm at gmail.com>
Date: 2022-04-28 (Thu, 28 Apr 2022)
Changed paths:
M mythtv/libs/libmythbase/mythrandom.h
Log Message:
-----------
mythrandom.h: remove now unused functions using Qt
Commit: ba26074123031f41a81157a8d4e3f8270ee989a2
https://github.com/MythTV/mythtv/commit/ba26074123031f41a81157a8d4e3f8270ee989a2
Author: ulmus-scott <scott.the.elm at gmail.com>
Date: 2022-04-28 (Thu, 28 Apr 2022)
Changed paths:
M mythplugins/mythmusic/mythmusic/bumpscope.cpp
M mythplugins/mythmusic/mythmusic/decoderhandler.cpp
M mythplugins/mythmusic/mythmusic/musiccommon.cpp
M mythplugins/mythmusic/mythmusic/vorbisencoder.cpp
Log Message:
-----------
mythmusic: replace POSIX random() with MythRandom
Commit: 60d043855b0cd5868d166ed801b87fbffce3b1e7
https://github.com/MythTV/mythtv/commit/60d043855b0cd5868d166ed801b87fbffce3b1e7
Author: ulmus-scott <scott.the.elm at gmail.com>
Date: 2022-04-28 (Thu, 28 Apr 2022)
Changed paths:
M mythtv/programs/mythbackend/mainserver.cpp
Log Message:
-----------
mythbackend/mainserver.cpp: replace POSIX random() with MythRandom()
Commit: 0c59286fa296c8477dba354cd31b1e052daabdcb
https://github.com/MythTV/mythtv/commit/0c59286fa296c8477dba354cd31b1e052daabdcb
Author: ulmus-scott <scott.the.elm at gmail.com>
Date: 2022-04-28 (Thu, 28 Apr 2022)
Changed paths:
M mythtv/libs/libmythbase/mythcorecontext.cpp
M mythtv/libs/libmythbase/mythdbcon.cpp
Log Message:
-----------
libmythbase: replace POSIX random() with MythRandom
Commit: ca4d1bcff6e3ef92ed4d4366d7052224c75f9b6b
https://github.com/MythTV/mythtv/commit/ca4d1bcff6e3ef92ed4d4366d7052224c75f9b6b
Author: ulmus-scott <scott.the.elm at gmail.com>
Date: 2022-04-28 (Thu, 28 Apr 2022)
Changed paths:
M mythtv/libs/libmythtv/recorders/rtp/packetbuffer.cpp
M mythtv/libs/libmythtv/recorders/rtp/packetbuffer.h
Log Message:
-----------
packetbuffer: fix logic for FreePacket()
m_next_empty_packet_key is a random number that is incremented. In FreePacket(),
the upper 32 bits are tested for equivalence.
However, the incrementing of m_next_empty_packet_key could overflow the lower 32 bits,
changing the upper 32. This would cause the if statement to be false and the packet to
not be marked as empty.
Starting with m_next_empty_packet_key with the lower 32 bits cleared, prevents this error
by allowing 2^32 packets before overflowing, far more than can be reasonably expected.
Compare: https://github.com/MythTV/mythtv/compare/cbcffc474df6...ca4d1bcff6e3
More information about the mythtv-commits
mailing list