summaryrefslogtreecommitdiff
path: root/gst/avi
diff options
context:
space:
mode:
authorThibault Saunier <tsaunier@gnome.org>2014-03-31 18:34:13 +0200
committerThibault Saunier <tsaunier@gnome.org>2014-03-31 18:38:28 +0200
commitb95d9cfb21e1a040505023b987a33fea138470e4 (patch)
treec7d8f03d0447768dcad4133e1a45f18258ef0962 /gst/avi
parent511202d50cc1d4fdf906589ad1ea7a30fa742a23 (diff)
downloadgstreamer-plugins-good-b95d9cfb21e1a040505023b987a33fea138470e4.tar.gz
avidemux: Always set PTS=DTS on raw video streams
Diffstat (limited to 'gst/avi')
-rw-r--r--gst/avi/gstavidemux.c10
-rw-r--r--gst/avi/gstavidemux.h1
2 files changed, 7 insertions, 4 deletions
diff --git a/gst/avi/gstavidemux.c b/gst/avi/gstavidemux.c
index f8f05cd66..0dc251778 100644
--- a/gst/avi/gstavidemux.c
+++ b/gst/avi/gstavidemux.c
@@ -1934,8 +1934,8 @@ gst_avi_demux_roundup_list (GstAviDemux * avi, GstBuffer ** buf)
}
static GstCaps *
-gst_avi_demux_check_caps (GstAviDemux * avi, GstCaps * caps,
- GstBuffer ** rgb8_palette)
+gst_avi_demux_check_caps (GstAviDemux * avi, GstAviStream * stream,
+ GstCaps * caps)
{
GstStructure *s;
const GValue *val;
@@ -2317,7 +2317,7 @@ gst_avi_demux_parse_stream (GstAviDemux * avi, GstBuffer * buf)
g_free (vprp);
vprp = NULL;
}
- caps = gst_avi_demux_check_caps (avi, caps, &stream->rgb8_palette);
+ caps = gst_avi_demux_check_caps (avi, stream, caps);
tag_name = GST_TAG_VIDEO_CODEC;
avi->num_v_streams++;
} else {
@@ -5239,14 +5239,16 @@ gst_avi_demux_loop_data (GstAviDemux * avi)
buf = gst_avi_demux_invert (stream, buf);
/* mark non-keyframes */
- if (keyframe) {
+ if (keyframe || stream->is_raw) {
GST_BUFFER_FLAG_UNSET (buf, GST_BUFFER_FLAG_DELTA_UNIT);
GST_BUFFER_PTS (buf) = timestamp;
} else {
GST_BUFFER_FLAG_SET (buf, GST_BUFFER_FLAG_DELTA_UNIT);
GST_BUFFER_PTS (buf) = GST_CLOCK_TIME_NONE;
}
+
GST_BUFFER_DTS (buf) = timestamp;
+
GST_BUFFER_DURATION (buf) = duration;
GST_BUFFER_OFFSET (buf) = out_offset;
GST_BUFFER_OFFSET_END (buf) = out_offset_end;
diff --git a/gst/avi/gstavidemux.h b/gst/avi/gstavidemux.h
index 3ca5bc609..0e8786fb9 100644
--- a/gst/avi/gstavidemux.h
+++ b/gst/avi/gstavidemux.h
@@ -119,6 +119,7 @@ typedef struct {
GstTagList *taglist;
gint index_id;
+ gboolean is_raw;
} GstAviStream;
typedef enum {