From fa4beeee75f6f4a8377d6fb2ab0844b8b7105840 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Thu, 11 Dec 2014 10:50:20 +0100 Subject: decoder/ffmpeg: detect and fix negative time stamps Works around assertion failure due to something that appears to be a (minor) FFmpeg bug. --- src/decoder/FfmpegDecoderPlugin.cxx | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/decoder/FfmpegDecoderPlugin.cxx b/src/decoder/FfmpegDecoderPlugin.cxx index 8a0937903..9a00bf3c4 100644 --- a/src/decoder/FfmpegDecoderPlugin.cxx +++ b/src/decoder/FfmpegDecoderPlugin.cxx @@ -284,10 +284,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; -- cgit v1.2.3 From 773de38bd9e018e48cf5b0a4f009dedce090bf0a Mon Sep 17 00:00:00 2001 From: k44 Date: Tue, 16 Dec 2014 18:43:05 +0100 Subject: playlist/embcue: fix filename suffix detection The definition of the playlist_plugin struct member of the embcue plugin was incorrect. --- src/playlist/EmbeddedCuePlaylistPlugin.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/playlist/EmbeddedCuePlaylistPlugin.cxx b/src/playlist/EmbeddedCuePlaylistPlugin.cxx index 2734fa59e..9ad71b8a8 100644 --- a/src/playlist/EmbeddedCuePlaylistPlugin.cxx +++ b/src/playlist/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, }; -- cgit v1.2.3