aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2012-10-05 16:35:45 +0200
committerMax Kellermann <max@duempel.org>2012-10-05 16:37:07 +0200
commite39382dedd224a97a896034c43772fa3da924b15 (patch)
tree84e31b875c9f6c0ce3960c6e6e4cfdedcca76f46 /src
parentfd016f45074cc5afd114163fb2d9390022e2e7d5 (diff)
downloadmpd-e39382dedd224a97a896034c43772fa3da924b15.tar.gz
mpd-e39382dedd224a97a896034c43772fa3da924b15.tar.xz
mpd-e39382dedd224a97a896034c43772fa3da924b15.zip
decoder/ffmpeg: ignore negative time stamps
Works around assertion failure in decoder_timestamp().
Diffstat (limited to 'src')
-rw-r--r--src/decoder/ffmpeg_decoder_plugin.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/decoder/ffmpeg_decoder_plugin.c b/src/decoder/ffmpeg_decoder_plugin.c
index bab6968e8..64227b85a 100644
--- a/src/decoder/ffmpeg_decoder_plugin.c
+++ b/src/decoder/ffmpeg_decoder_plugin.c
@@ -273,7 +273,7 @@ ffmpeg_send_packet(struct decoder *decoder, struct input_stream *is,
AVCodecContext *codec_context,
const AVRational *time_base)
{
- if (packet->pts != (int64_t)AV_NOPTS_VALUE)
+ if (packet->pts >= 0 && packet->pts != (int64_t)AV_NOPTS_VALUE)
decoder_timestamp(decoder,
time_from_ffmpeg(packet->pts, *time_base));