avcodec: unbreak libav hardware acceleration (fixes #18170)
authorRémi Denis-Courmont <remi@remlab.net>
Fri, 5 May 2017 17:04:51 +0000 (20:04 +0300)
committerRémi Denis-Courmont <remi@remlab.net>
Fri, 5 May 2017 17:08:15 +0000 (20:08 +0300)
Regression from commit 869db8d97312545567506a4c06df045c14c6d02d.

modules/codec/avcodec/video.c

index 632b317..85e9bf7 100644 (file)
@@ -1463,7 +1463,8 @@ static enum PixelFormat ffmpeg_GetFormat( AVCodecContext *p_context,
     if (!can_hwaccel)
         return swfmt;
 
-#if !LIBAVCODEC_VERSION_CHECK(57, 30, 1, 83, 101)
+#if (LIBAVCODEC_VERSION_MICRO >= 100) \
+  && (LIBAVCODEC_VERSION_INT < AV_VERSION_INT(57, 83, 101))
     if (p_context->active_thread_type)
     {
         msg_Warn(p_dec, "thread type %d: disabling hardware acceleration",