aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/decoder/plugins/FfmpegDecoderPlugin.cxx11
-rw-r--r--src/playlist/plugins/EmbeddedCuePlaylistPlugin.cxx2
2 files changed, 8 insertions, 5 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;
diff --git a/src/playlist/plugins/EmbeddedCuePlaylistPlugin.cxx b/src/playlist/plugins/EmbeddedCuePlaylistPlugin.cxx
index 9e8f91e05..8baa11c03 100644
--- a/src/playlist/plugins/EmbeddedCuePlaylistPlugin.cxx
+++ b/src/playlist/plugins/EmbeddedCuePlaylistPlugin.cxx
@@ -178,7 +178,7 @@ const struct playlist_plugin embcue_playlist_plugin = {
embcue_playlist_open_uri,
nullptr,
- embcue_playlist_suffixes,
nullptr,
+ embcue_playlist_suffixes,
nullptr,
};