mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-04-01 16:36:42 +00:00
Simplified casting when comparing to AV_NOPTS_VALUE.
AV_NOPTS_VALUE is casted to int64_t when compared with pts, so with libavc >= 56.1 it should be no-op because in that version it's already signed int. Signed-off-by: Lukasz Gromanowski <lgromanowski@gmail.com>
This commit is contained in:
parent
7ad6a94523
commit
c72369fafe
1 changed files with 1 additions and 9 deletions
|
@ -15,14 +15,6 @@ AVAudioResampleContext * swr_alloc_set_opts( AVAudioResampleContext *avr, int64_
|
|||
#endif
|
||||
}
|
||||
|
||||
#if LIBAVCODEC_VERSION_INT < AV_VERSION_INT(56,1,0)
|
||||
#define IS_NOTEQ_NOPTS_VAL(x) ((uint64_t)x != AV_NOPTS_VALUE)
|
||||
#define IS_NOTEQ_NOPTS_VAL_PTR(x) (*(uint64_t*)x != AV_NOPTS_VALUE)
|
||||
#else
|
||||
#define IS_NOTEQ_NOPTS_VAL(x) ((int64_t)x != AV_NOPTS_VALUE)
|
||||
#define IS_NOTEQ_NOPTS_VAL_PTR(x) (*(int64_t*)x != AV_NOPTS_VALUE)
|
||||
#endif /* LIBAVCODEC_VERSION_INT < AV_VERSION_INT(56,1,0) */
|
||||
|
||||
namespace MWSound
|
||||
{
|
||||
|
||||
|
@ -77,7 +69,7 @@ bool FFmpeg_Decoder::getNextPacket()
|
|||
/* Check if the packet belongs to this stream */
|
||||
if(stream_idx == mPacket.stream_index)
|
||||
{
|
||||
if(IS_NOTEQ_NOPTS_VAL(mPacket.pts))
|
||||
if(mPacket.pts != (int64_t)AV_NOPTS_VALUE)
|
||||
mNextPts = av_q2d((*mStream)->time_base)*mPacket.pts;
|
||||
return true;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue