This is only tested to compile using libav10 from sid. While it fixes
the FTFBS for me, I haven't tested to see if it breaks any
functionality.
---
metadata.c | 44 ++++++++++++++++++++++----------------------
1 file changed, 22 insertions(+), 22 deletions(-)
diff --git a/metadata.c b/metadata.c
index dd6eae8..88c027c 100644
--- a/metadata.c
+++ b/metadata.c
@@ -772,10 +772,10 @@ GetVideoMetadata(const char *path, char *name)
aac_object_type_t aac_type = AAC_INVALID;
switch( ac->codec_id )
{
- case CODEC_ID_MP3:
+ case AV_CODEC_ID_MP3:
audio_profile = PROFILE_AUDIO_MP3;
break;
- case CODEC_ID_AAC:
+ case AV_CODEC_ID_AAC:
if( !ac->extradata_size ||
!ac->extradata )
{
@@ -816,12 +816,12 @@ GetVideoMetadata(const char *path, char *name)
break;
}
break;
- case CODEC_ID_AC3:
- case CODEC_ID_DTS:
+ case AV_CODEC_ID_AC3:
+ case AV_CODEC_ID_DTS:
audio_profile = PROFILE_AUDIO_AC3;
break;
- case CODEC_ID_WMAV1:
- case CODEC_ID_WMAV2:
+ case AV_CODEC_ID_WMAV1:
+ case AV_CODEC_ID_WMAV2:
/* WMA Baseline: stereo, up to 48 KHz, up to
192,999 bps */
if ( ac->bit_rate <= 193000 )
audio_profile = PROFILE_AUDIO_WMA_BASE;
@@ -830,19 +830,19 @@ GetVideoMetadata(const char *path, char *name)
audio_profile = PROFILE_AUDIO_WMA_FULL;
break;
#if LIBAVCODEC_VERSION_INT > ((51<<16)+(50<<8)+1)
- case CODEC_ID_WMAPRO:
+ case AV_CODEC_ID_WMAPRO:
audio_profile = PROFILE_AUDIO_WMA_PRO;
break;
#endif
- case CODEC_ID_MP2:
+ case AV_CODEC_ID_MP2:
audio_profile = PROFILE_AUDIO_MP2;
break;
- case CODEC_ID_AMR_NB:
+ case AV_CODEC_ID_AMR_NB:
audio_profile = PROFILE_AUDIO_AMR;
break;
default:
- if( (ac->codec_id >= CODEC_ID_PCM_S16LE) &&
- (ac->codec_id < CODEC_ID_ADPCM_IMA_QT) )
+ if( (ac->codec_id >= AV_CODEC_ID_PCM_S16LE) &&
+ (ac->codec_id < AV_CODEC_ID_ADPCM_IMA_QT) )
audio_profile = PROFILE_AUDIO_PCM;
else
DPRINTF(E_DEBUG, L_METADATA, "Unhandled
audio codec [0x%X]\n", ac->codec_id);
@@ -879,7 +879,7 @@ GetVideoMetadata(const char *path, char *name)
if( strcmp(ctx->iformat->name, "avi") == 0 )
{
xasprintf(&m.mime, "video/x-msvideo");
- if( vc->codec_id == CODEC_ID_MPEG4 )
+ if( vc->codec_id == AV_CODEC_ID_MPEG4 )
{
fourcc[0] = vc->codec_tag & 0xff;
fourcc[1] = vc->codec_tag>>8 & 0xff;
@@ -903,7 +903,7 @@ GetVideoMetadata(const char *path, char *name)
switch( vc->codec_id )
{
- case CODEC_ID_MPEG1VIDEO:
+ case AV_CODEC_ID_MPEG1VIDEO:
if( strcmp(ctx->iformat->name, "mpeg") == 0 )
{
if( (vc->width == 352) &&
@@ -914,7 +914,7 @@ GetVideoMetadata(const char *path, char *name)
xasprintf(&m.mime, "video/mpeg");
}
break;
- case CODEC_ID_MPEG2VIDEO:
+ case AV_CODEC_ID_MPEG2VIDEO:
m.dlna_pn = malloc(64);
off = sprintf(m.dlna_pn, "MPEG_");
if( strcmp(ctx->iformat->name, "mpegts") == 0 )
@@ -987,7 +987,7 @@ GetVideoMetadata(const char *path, char *name)
m.dlna_pn = NULL;
}
break;
- case CODEC_ID_H264:
+ case AV_CODEC_ID_H264:
m.dlna_pn = malloc(128);
off = sprintf(m.dlna_pn, "AVC_");
@@ -1005,11 +1005,11 @@ GetVideoMetadata(const char *path, char *name)
vc->height *
vc->sample_aspect_ratio.den,
1024*1024);
}
- if
(ctx->streams[video_stream]->r_frame_rate.den)
- fps =
ctx->streams[video_stream]->r_frame_rate.num /
ctx->streams[video_stream]->r_frame_rate.den;
+ if
(ctx->streams[video_stream]->avg_frame_rate.den)
+ fps =
ctx->streams[video_stream]->avg_frame_rate.num /
ctx->streams[video_stream]->avg_frame_rate.den;
else
fps = 0;
- interlaced = vc->time_base.den ?
(ctx->streams[video_stream]->r_frame_rate.num / vc->time_base.den) : 0;
+ interlaced = vc->time_base.den ?
(ctx->streams[video_stream]->avg_frame_rate.num / vc->time_base.den) : 0;
if( ((((vc->width == 1920 || vc->width
== 1440) && vc->height == 1080) ||
(vc->width == 720 && vc->height
== 480)) && fps == 59 && interlaced) ||
((vc->width == 1280 && vc->height
== 720) && fps == 59 && !interlaced) )
@@ -1298,7 +1298,7 @@ GetVideoMetadata(const char *path, char *name)
}
DPRINTF(E_DEBUG, L_METADATA, "Stream %d of %s
is h.264\n", video_stream, basepath);
break;
- case CODEC_ID_MPEG4:
+ case AV_CODEC_ID_MPEG4:
fourcc[0] = vc->codec_tag & 0xff;
fourcc[1] = vc->codec_tag>>8 & 0xff;
fourcc[2] = vc->codec_tag>>16 & 0xff;
@@ -1361,7 +1361,7 @@ GetVideoMetadata(const char *path, char *name)
}
}
break;
- case CODEC_ID_WMV3:
+ case AV_CODEC_ID_WMV3:
/* I'm not 100% sure this is correct, but it
works on everything I could get my hands on */
if( vc->extradata_size > 0 )
{
@@ -1370,7 +1370,7 @@ GetVideoMetadata(const char *path, char *name)
if( !((vc->extradata[0] >> 6) & 1) )
vc->profile = 0;
}
- case CODEC_ID_VC1:
+ case AV_CODEC_ID_VC1:
if( strcmp(ctx->iformat->name, "asf") != 0 )
{
DPRINTF(E_DEBUG, L_METADATA, "Skipping
DLNA parsing for non-ASF VC1 file %s\n", path);
@@ -1469,7 +1469,7 @@ GetVideoMetadata(const char *path, char *name)
}
}
break;
- case CODEC_ID_MSMPEG4V3:
+ case AV_CODEC_ID_MSMPEG4V3:
xasprintf(&m.mime, "video/x-msvideo");
default:
DPRINTF(E_DEBUG, L_METADATA, "Stream %d of %s
is %s [type %d]\n",
--
1.9.1
--
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]