diff options
author | Max Kellermann <max@duempel.org> | 2014-12-17 19:19:13 +0100 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2014-12-17 19:19:13 +0100 |
commit | 9c56c49e73319a339f77969c61aa6df7574e9bc6 (patch) | |
tree | 5fee115d1d8c6e58f83dcdfee945824d9a5364b6 /src/decoder | |
parent | c5720a15c76a15debadc9205afa2558f11e5d9ff (diff) | |
parent | acb798e54481916c5fa25e3c227eb1f1c7316a10 (diff) | |
download | mpd-9c56c49e73319a339f77969c61aa6df7574e9bc6.tar.gz mpd-9c56c49e73319a339f77969c61aa6df7574e9bc6.tar.xz mpd-9c56c49e73319a339f77969c61aa6df7574e9bc6.zip |
Merge tag 'v0.18.21' into v0.19.x
Diffstat (limited to 'src/decoder')
-rw-r--r-- | src/decoder/plugins/FfmpegDecoderPlugin.cxx | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/decoder/plugins/FfmpegDecoderPlugin.cxx b/src/decoder/plugins/FfmpegDecoderPlugin.cxx index e150fa3bf..494f4048b 100644 --- a/src/decoder/plugins/FfmpegDecoderPlugin.cxx +++ b/src/decoder/plugins/FfmpegDecoderPlugin.cxx @@ -313,10 +313,13 @@ ffmpeg_send_packet(Decoder &decoder, InputStream &is, AVFrame *frame, uint8_t **buffer, int *buffer_size) { - if (packet->pts >= 0 && packet->pts != (int64_t)AV_NOPTS_VALUE) - decoder_timestamp(decoder, - time_from_ffmpeg(packet->pts - start_time_fallback(*stream), - stream->time_base)); + if (packet->pts >= 0 && packet->pts != (int64_t)AV_NOPTS_VALUE) { + auto start = start_time_fallback(*stream); + if (packet->pts >= start) + decoder_timestamp(decoder, + time_from_ffmpeg(packet->pts - start, + stream->time_base)); + } AVPacket packet2 = *packet; |