>From 95f14519e4766f2df1894f8199ad42761d2a6b81 Mon Sep 17 00:00:00 2001
From: Vittorio Giovara
Date: Thu, 21 Apr 2011 18:34:26 +0200
Subject: [PATCH] compatibility with Libav
---
src/media_object.cpp | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/media_object.cpp b/src/media_object.cpp
index d766713..bb611ef 100644
--- a/src/media_object.cpp
+++ b/src/media_object.cpp
@@ -664,7 +664,7 @@ void media_object::open(const std::string &url)
&& i < static_cast(std::numeric_limits::max()); i++)
{
_ffmpeg->format_ctx->streams[i]->discard = AVDISCARD_ALL; // ignore by default; user must activate streams
- if (_ffmpeg->format_ctx->streams[i]->codec->codec_type == CODEC_TYPE_VIDEO)
+ if (_ffmpeg->format_ctx->streams[i]->codec->codec_type == AVMEDIA_TYPE_VIDEO)
{
_ffmpeg->video_streams.push_back(i);
int j = _ffmpeg->video_streams.size() - 1;
@@ -732,7 +732,7 @@ void media_object::open(const std::string &url)
}
_ffmpeg->video_last_timestamps.push_back(std::numeric_limits::min());
}
- else if (_ffmpeg->format_ctx->streams[i]->codec->codec_type == CODEC_TYPE_AUDIO)
+ else if (_ffmpeg->format_ctx->streams[i]->codec->codec_type == AVMEDIA_TYPE_AUDIO)
{
_ffmpeg->audio_streams.push_back(i);
int j = _ffmpeg->audio_streams.size() - 1;
@@ -764,7 +764,7 @@ void media_object::open(const std::string &url)
_ffmpeg->audio_buffers.push_back(std::vector());
_ffmpeg->audio_last_timestamps.push_back(std::numeric_limits::min());
}
- else if (_ffmpeg->format_ctx->streams[i]->codec->codec_type == CODEC_TYPE_SUBTITLE)
+ else if (_ffmpeg->format_ctx->streams[i]->codec->codec_type == AVMEDIA_TYPE_SUBTITLE)
{
_ffmpeg->subtitle_streams.push_back(i);
int j = _ffmpeg->subtitle_streams.size() - 1;
--
1.7.1