Browse Source

- compilation fix for #765

Ivan Savenko 14 năm trước cách đây
mục cha
commit
75d068bc03
1 tập tin đã thay đổi với 6 bổ sung1 xóa
  1. 6 1
      client/CVideoHandler.cpp

+ 6 - 1
client/CVideoHandler.cpp

@@ -708,7 +708,12 @@ bool CVideoPlayer::open(std::string fname, bool loop, bool useOverlay)
 	// Find the first video stream
 	stream = -1;
 	for(unsigned int i=0; i<format->nb_streams; i++) {
-		if (format->streams[i]->codec->codec_type==AVMEDIA_TYPE_VIDEO) {
+#if LIBAVCODEC_VERSION_MAJOR < 53
+		if (format->streams[i]->codec->codec_type==CODEC_TYPE_VIDEO)
+#else
+		if (format->streams[i]->codec->codec_type==AVMEDIA_TYPE_VIDEO)
+#endif
+		{
 			stream = i;
 			break;
 		}