Skip to content

Commit

Permalink
libavcodec/internal.h: fix compilation with MSVC
Browse files Browse the repository at this point in the history
  • Loading branch information
ulmus-scott authored and bennettpeter committed Nov 27, 2021
1 parent acd3092 commit 6d952d5
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions mythtv/external/FFmpeg/libavcodec/internal.h
Expand Up @@ -279,8 +279,16 @@ static av_always_inline int64_t ff_samples_to_time_base(AVCodecContext *avctx,
{
if(samples == AV_NOPTS_VALUE)
return AV_NOPTS_VALUE;
#ifndef _MSC_VER
return av_rescale_q(samples, (AVRational){ 1, avctx->sample_rate },
avctx->time_base);
#else
AVRational rational;
rational.num = 1;
rational.den = avctx->sample_rate;

return av_rescale_q(samples, rational, avctx->time_base);
#endif
}

/**
Expand Down

0 comments on commit 6d952d5

Please sign in to comment.