Parcourir la source

Fix ffmpeg deprecation

Ivan Savenko il y a 1 an
Parent
commit
50a4e3213d
1 fichiers modifiés avec 3 ajouts et 2 suppressions
  1. 3 2
      client/media/CVideoHandler.cpp

+ 3 - 2
client/media/CVideoHandler.cpp

@@ -339,10 +339,11 @@ FFMpegStream::~FFMpegStream()
 {
 	av_frame_free(&frame);
 
+#if (LIBAVCODEC_VERSION_MAJOR < 61 )
+	// deprecated, apparently no longer necessary - avcodec_free_context should suffice
 	avcodec_close(codecContext);
-	avcodec_free_context(&codecContext);
+#endif
 
-	avcodec_close(codecContext);
 	avcodec_free_context(&codecContext);
 
 	avformat_close_input(&formatContext);