Commit e39382de authored by Max Kellermann's avatar Max Kellermann

decoder/ffmpeg: ignore negative time stamps

Works around assertion failure in decoder_timestamp().
parent fd016f45
...@@ -4,6 +4,8 @@ ver 0.17.3 (2012/??/??) ...@@ -4,6 +4,8 @@ ver 0.17.3 (2012/??/??)
- recorder: fix I/O error check - recorder: fix I/O error check
- shout: fix memory leak in error handler - shout: fix memory leak in error handler
- recorder, shout: support Ogg packets that span more than one page - recorder, shout: support Ogg packets that span more than one page
* decoder:
- ffmpeg: ignore negative time stamps
ver 0.17.2 (2012/09/30) ver 0.17.2 (2012/09/30)
* protocol: * protocol:
......
...@@ -273,7 +273,7 @@ ffmpeg_send_packet(struct decoder *decoder, struct input_stream *is, ...@@ -273,7 +273,7 @@ ffmpeg_send_packet(struct decoder *decoder, struct input_stream *is,
AVCodecContext *codec_context, AVCodecContext *codec_context,
const AVRational *time_base) 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, decoder_timestamp(decoder,
time_from_ffmpeg(packet->pts, *time_base)); time_from_ffmpeg(packet->pts, *time_base));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment