From 65d08e2154eba75323fa7badfb78c0c9327d0a43 Mon Sep 17 00:00:00 2001 From: Nicola Murino Date: Tue, 27 Oct 2015 10:48:00 +0100 Subject: [PATCH] matroskamux: don't drop JPEG frames that only have PTS but no DTS set For the MS/VfW codec ids, we want to write DTS timestamps instead of PTS because that's what everyone else seems to do (and it's also how it is in AVI). So for those input formats we use the buffer DTS instead of the PTS. However, if there's no DTS set but only the PTS then just take the PTS instead of dropping the input buffer. This is useful especially for I-frame only codecs like JPEG and huffyuv, but should also be fine as fallback in general. Fixes regression with input JPEG frames that only have PTS set on them. https://bugzilla.gnome.org/show_bug.cgi?id=756967 --- gst/matroska/matroska-ids.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gst/matroska/matroska-ids.c b/gst/matroska/matroska-ids.c index 52e5dc30d1..74b4147f87 100644 --- a/gst/matroska/matroska-ids.c +++ b/gst/matroska/matroska-ids.c @@ -305,7 +305,7 @@ gst_matroska_track_get_buffer_timestamp (GstMatroskaTrackContext * track, GstBuffer * buf) { if (track->dts_only) { - return GST_BUFFER_DTS (buf); + return GST_BUFFER_DTS_OR_PTS (buf); } else { return GST_BUFFER_PTS (buf); }