浏览代码

- compilation fix for #765

Ivan Savenko 14 年之前
父节点
当前提交
75d068bc03
共有 1 个文件被更改,包括 6 次插入1 次删除
  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;
 		}