diff options
author | Max Kellermann <max@duempel.org> | 2014-12-17 19:27:59 +0100 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2014-12-17 19:27:59 +0100 |
commit | 8400da9934df3e61f0dc792c7f9ce311b0103b39 (patch) | |
tree | 0e769e89fed8f2e3c1bd80e9623d6bad8aa82dc6 /src/decoder/plugins | |
parent | ae8bdd473c0481d2685dbdee4bd2df73c4199250 (diff) | |
parent | 6d89020f80290b3eec97abbe25cc5d52fbd7b5cf (diff) | |
download | mpd-8400da9934df3e61f0dc792c7f9ce311b0103b39.tar.gz mpd-8400da9934df3e61f0dc792c7f9ce311b0103b39.tar.xz mpd-8400da9934df3e61f0dc792c7f9ce311b0103b39.zip |
Merge tag 'v0.19.7'
Diffstat (limited to 'src/decoder/plugins')
-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 7e164e5bd..0afdea6e4 100644 --- a/src/decoder/plugins/FfmpegDecoderPlugin.cxx +++ b/src/decoder/plugins/FfmpegDecoderPlugin.cxx @@ -316,10 +316,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; |