projects
/
platform
/
upstream
/
gstreamer.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
57d0a5d
)
videoencoder: Check for invalid stop position before calculating a duration from it
author
Matej Knopp
<matej.knopp@gmail.com>
Mon, 2 Sep 2013 22:47:18 +0000
(
00:47
+0200)
committer
Sebastian Dröge
<slomo@circular-chaos.org>
Tue, 3 Sep 2013 07:50:56 +0000
(09:50 +0200)
https://bugzilla.gnome.org/show_bug.cgi?id=707332
gst-libs/gst/video/gstvideoencoder.c
patch
|
blob
|
history
diff --git
a/gst-libs/gst/video/gstvideoencoder.c
b/gst-libs/gst/video/gstvideoencoder.c
index
b0a278d
..
3c06ea9
100644
(file)
--- a/
gst-libs/gst/video/gstvideoencoder.c
+++ b/
gst-libs/gst/video/gstvideoencoder.c
@@
-1290,10
+1290,15
@@
gst_video_encoder_chain (GstPad * pad, GstObject * parent, GstBuffer * buf)
goto done;
}
+ if (GST_CLOCK_TIME_IS_VALID (cstop))
+ duration = cstop - cstart;
+ else
+ duration = GST_CLOCK_TIME_NONE;
+
/* incoming DTS is not really relevant and does not make sense anyway,
* so pass along _NONE and maybe come up with something better later on */
frame = gst_video_encoder_new_frame (encoder, buf, cstart,
- GST_CLOCK_TIME_NONE,
cstop - cstart
);
+ GST_CLOCK_TIME_NONE,
duration
);
GST_OBJECT_LOCK (encoder);
if (priv->force_key_unit) {