libdlna: version bump to 0.2.4
[openwrt/svn-archive/archive.git] / libs / libdlna / patches / 300-ffmpeg_compat.patch
1 --- a/src/profiles.c
2 +++ b/src/profiles.c
3 @@ -205,13 +205,13 @@ av_profile_get_codecs (AVFormatContext *
4 for (i = 0; i < ctx->nb_streams; i++)
5 {
6 if (audio_stream == -1 &&
7 - ctx->streams[i]->codec->codec_type == AVMEDIA_TYPE_AUDIO)
8 + ctx->streams[i]->codec->codec_type == LIBDLNA_CODEC_TYPE_AUDIO)
9 {
10 audio_stream = i;
11 continue;
12 }
13 else if (video_stream == -1 &&
14 - ctx->streams[i]->codec->codec_type == AVMEDIA_TYPE_VIDEO)
15 + ctx->streams[i]->codec->codec_type == LIBDLNA_CODEC_TYPE_VIDEO)
16 {
17 video_stream = i;
18 continue;
19 --- a/src/profiles.h
20 +++ b/src/profiles.h
21 @@ -25,6 +25,14 @@
22 #include <libavcodec/avcodec.h>
23 #include <libavformat/avformat.h>
24
25 +#if (LIBAVCODEC_VERSION_MAJOR > 52)
26 +# define LIBDLNA_CODEC_TYPE_AUDIO (AVMEDIA_TYPE_AUDIO)
27 +# define LIBDLNA_CODEC_TYPE_VIDEO (AVMEDIA_TYPE_VIDEO)
28 +#else
29 +# define LIBDLNA_CODEC_TYPE_AUDIO (CODEC_TYPE_AUDIO)
30 +# define LIBDLNA_CODEC_TYPE_VIDEO (CODEC_TYPE_VIDEO)
31 +#endif
32 +
33 #include "dlna_internals.h"
34 #include "containers.h"
35