Advertisement
Guest User

Untitled

a guest
Jun 24th, 2020
49
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.85 KB | None | 0 0
  1. diff --git a/mythtv/libs/libmythtv/decoders/mythvdpaucontext.cpp b/mythtv/libs/libmythtv/decoders/mythvdpaucontext.cpp
  2. index b80eeaad22..56e57ee2d2 100644
  3. --- a/mythtv/libs/libmythtv/decoders/mythvdpaucontext.cpp
  4. +++ b/mythtv/libs/libmythtv/decoders/mythvdpaucontext.cpp
  5. @@ -106,7 +106,8 @@ int MythVDPAUContext::InitialiseContext(AVCodecContext* Context)
  6. }
  7.  
  8. auto* vdpaudevicectx = static_cast<AVVDPAUDeviceContext*>(hwdevicecontext->hwctx);
  9. - if (av_vdpau_bind_context(Context, vdpaudevicectx->device, vdpaudevicectx->get_proc_address, 0) != 0)
  10. + if (av_vdpau_bind_context(Context, vdpaudevicectx->device,
  11. + vdpaudevicectx->get_proc_address, AV_HWACCEL_FLAG_IGNORE_LEVEL) != 0)
  12. {
  13. LOG(VB_GENERAL, LOG_ERR, LOC + "Failed to bind VDPAU context");
  14. av_buffer_unref(&hwdeviceref);
  15. diff --git a/mythtv/libs/libmythtv/decoders/mythvdpauhelper.cpp b/mythtv/libs/libmythtv/decoders/mythvdpauhelper.cpp
  16. index b2d56ed8eb..fc0cbeddbb 100644
  17. --- a/mythtv/libs/libmythtv/decoders/mythvdpauhelper.cpp
  18. +++ b/mythtv/libs/libmythtv/decoders/mythvdpauhelper.cpp
  19. @@ -37,9 +37,10 @@ VDPAUCodec::VDPAUCodec(MythCodecContext::CodecProfile Profile, QSize Size, uint3
  20.  
  21. bool VDPAUCodec::Supported(int Width, int Height, int Level) const
  22. {
  23. + // Note - level checks are now ignored here and in FFmpeg
  24. uint32_t macros = static_cast<uint32_t>(((Width + 15) & ~15) * ((Height + 15) & ~15)) / 256;
  25. bool result = (Width <= m_maxSize.width()) && (Height <= m_maxSize.height()) &&
  26. - (macros <= m_maxMacroBlocks) && (static_cast<uint32_t>(Level) <= m_maxLevel);
  27. + (macros <= m_maxMacroBlocks) /*&& (static_cast<uint32_t>(Level) <= m_maxLevel)*/;
  28. if (!result)
  29. {
  30. LOG(VB_PLAYBACK, LOG_DEBUG, LOC + QString("Not supported: Size %1x%2 > %3x%4, MBs %5 > %6, Level %7 > %8")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement