summaryrefslogtreecommitdiff
path: root/community/deadbeef/ffmpeg.patch
blob: 925b8440895ac6c992d4f05ad52a4bb997a82b1c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
diff -aur deadbeef-0.5.1/plugins/ffmpeg/ffmpeg.c deadbeef-0.5.1.new/plugins/ffmpeg/ffmpeg.c
--- deadbeef-0.5.1/plugins/ffmpeg/ffmpeg.c	2011-05-22 13:58:53.000000000 +0000
+++ deadbeef-0.5.1.new/plugins/ffmpeg/ffmpeg.c	2011-11-01 10:38:11.447669741 +0000
@@ -140,7 +140,12 @@
     for (i = 0; i < info->fctx->nb_streams; i++)
     {
         info->ctx = info->fctx->streams[i]->codec;
-        if (info->ctx->codec_type == CODEC_TYPE_AUDIO)
+        if (info->ctx->codec_type == 
+#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(52, 64, 0)
+		            AVMEDIA_TYPE_AUDIO)
+#else
+		            CODEC_TYPE_AUDIO)
+#endif
         {
             info->codec = avcodec_find_decoder (info->ctx->codec_id);
             if (info->codec != NULL) {
@@ -490,7 +495,12 @@
     for (i = 0; i < fctx->nb_streams; i++)
     {
         ctx = fctx->streams[i]->codec;
-        if (ctx->codec_type == CODEC_TYPE_AUDIO)
+        if (ctx->codec_type == 
+#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(52, 64, 0)
+		            AVMEDIA_TYPE_AUDIO)
+#else
+		            CODEC_TYPE_AUDIO)
+#endif
         {
             codec = avcodec_find_decoder(ctx->codec_id);
             if (codec != NULL && !strcasecmp (codec->name, "alac")) { // only open alac streams
@@ -745,7 +755,12 @@
     for (i = 0; i < fctx->nb_streams; i++)
     {
         ctx = fctx->streams[i]->codec;
-        if (ctx->codec_type == CODEC_TYPE_AUDIO)
+        if (ctx->codec_type == 
+#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(52, 64, 0)
+			            AVMEDIA_TYPE_AUDIO)
+#else
+		            CODEC_TYPE_AUDIO)
+#endif
         {
             codec = avcodec_find_decoder(ctx->codec_id);
             if (codec != NULL)