aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2008-12-24 11:56:53 +0100
committerMax Kellermann <max@duempel.org>2008-12-24 11:56:53 +0100
commit7f98ba24c7ffb026544a0c400e9d8a34ed955782 (patch)
tree01ccf682c6e37fd96bc74adfd4b2ea4ed20c38f1 /src
parent82ef85a3097e9fc9e24767c1180c4bdb577dd0cd (diff)
downloadmpd-7f98ba24c7ffb026544a0c400e9d8a34ed955782.tar.gz
mpd-7f98ba24c7ffb026544a0c400e9d8a34ed955782.tar.xz
mpd-7f98ba24c7ffb026544a0c400e9d8a34ed955782.zip
ffmpeg: case AV_NOPTS_VALUE to int64_t
The old code casted it to a 32 bit integer, which cut off bits. AVFormatContext.duration is a int64_t, so use this type.
Diffstat (limited to 'src')
-rw-r--r--src/decoder/ffmpeg_plugin.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/decoder/ffmpeg_plugin.c b/src/decoder/ffmpeg_plugin.c
index d1e17885a..7f7978b9d 100644
--- a/src/decoder/ffmpeg_plugin.c
+++ b/src/decoder/ffmpeg_plugin.c
@@ -279,7 +279,7 @@ ffmpeg_decode_internal(struct ffmpeg_context *ctx)
}
//there is some problem with this on some demux (mp3 at least)
- if (format_context->duration != (int)AV_NOPTS_VALUE) {
+ if (format_context->duration != (int64_t)AV_NOPTS_VALUE) {
total_time = format_context->duration / AV_TIME_BASE;
}
@@ -330,7 +330,7 @@ static bool ffmpeg_tag_internal(struct ffmpeg_context *ctx)
const AVFormatContext *f = ctx->format_context;
tag->time = 0;
- if (f->duration != (int)AV_NOPTS_VALUE)
+ if (f->duration != (int64_t)AV_NOPTS_VALUE)
tag->time = f->duration / AV_TIME_BASE;
if (f->author[0])
tag_add_item(tag, TAG_ITEM_ARTIST, f->author);