2013-02-25 21:04:09 +00:00
|
|
|
--- a/src/profiles.c
|
|
|
|
+++ b/src/profiles.c
|
|
|
|
@@ -205,13 +205,13 @@ av_profile_get_codecs (AVFormatContext *
|
2011-10-10 11:18:57 +00:00
|
|
|
for (i = 0; i < ctx->nb_streams; i++)
|
|
|
|
{
|
|
|
|
if (audio_stream == -1 &&
|
2013-02-25 21:04:09 +00:00
|
|
|
- ctx->streams[i]->codec->codec_type == AVMEDIA_TYPE_AUDIO)
|
2011-10-10 11:18:57 +00:00
|
|
|
+ ctx->streams[i]->codec->codec_type == LIBDLNA_CODEC_TYPE_AUDIO)
|
|
|
|
{
|
|
|
|
audio_stream = i;
|
|
|
|
continue;
|
|
|
|
}
|
|
|
|
else if (video_stream == -1 &&
|
2013-02-25 21:04:09 +00:00
|
|
|
- ctx->streams[i]->codec->codec_type == AVMEDIA_TYPE_VIDEO)
|
2011-10-10 11:18:57 +00:00
|
|
|
+ ctx->streams[i]->codec->codec_type == LIBDLNA_CODEC_TYPE_VIDEO)
|
|
|
|
{
|
|
|
|
video_stream = i;
|
|
|
|
continue;
|
2013-02-25 21:04:09 +00:00
|
|
|
--- a/src/profiles.h
|
|
|
|
+++ b/src/profiles.h
|
2011-10-10 11:18:57 +00:00
|
|
|
@@ -25,6 +25,14 @@
|
|
|
|
#include <libavcodec/avcodec.h>
|
|
|
|
#include <libavformat/avformat.h>
|
|
|
|
|
|
|
|
+#if (LIBAVCODEC_VERSION_MAJOR > 52)
|
|
|
|
+# define LIBDLNA_CODEC_TYPE_AUDIO (AVMEDIA_TYPE_AUDIO)
|
|
|
|
+# define LIBDLNA_CODEC_TYPE_VIDEO (AVMEDIA_TYPE_VIDEO)
|
|
|
|
+#else
|
|
|
|
+# define LIBDLNA_CODEC_TYPE_AUDIO (CODEC_TYPE_AUDIO)
|
|
|
|
+# define LIBDLNA_CODEC_TYPE_VIDEO (CODEC_TYPE_VIDEO)
|
|
|
|
+#endif
|
|
|
|
+
|
|
|
|
#include "dlna_internals.h"
|
|
|
|
#include "containers.h"
|
|
|
|
|