Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • gstreamer/gst-plugins-good
  • thiblahute/gst-plugins-good
  • slomo/gst-plugins-good
  • sree/gst-plugins-good
  • seungha.yang/gst-plugins-good
  • xclaesse/gst-plugins-good
  • haihao/gst-plugins-good
  • alatiera/gst-plugins-good
  • heftig/gst-plugins-good
  • bilboed/gst-plugins-good
  • ndufresne/gst-plugins-good
  • ystreet/gst-plugins-good
  • hgr/gst-plugins-good
  • nielsdg/gst-plugins-good
  • jh-hsd/gst-plugins-good
  • linussn/gst-plugins-good
  • meh/gst-plugins-good
  • ntrrgc/gst-plugins-good
  • gdesmott/gst-plugins-good
  • arun/gst-plugins-good
  • Yeongjin-Jeong/gst-plugins-good
  • christli/gst-plugins-good
  • drakkan/gst-plugins-good
  • tpm/gst-plugins-good
  • patrickr/gst-plugins-good
  • patricia/gst-plugins-good
  • ahresse/gst-plugins-good
  • mparisdiaz/gst-plugins-good
  • milloni-ct/gst-plugins-good
  • cadubentzen/gst-plugins-good
  • juanpablougarte/gst-plugins-good
  • joykim/gst-plugins-good
  • jonnylamb/gst-plugins-good
  • myrandy1/gst-plugins-good
  • camilo-celis/gst-plugins-good
  • elmarco/gst-plugins-good
  • donghyeok/gst-plugins-good
  • zeenix/gst-plugins-good
  • kode54/gst-plugins-good
  • victortoso/gst-plugins-good
  • nirbheek/gst-plugins-good
  • gkiagia/gst-plugins-good
  • erlend_ne/gst-plugins-good
  • cfoch/gst-plugins-good
  • codinho/gst-plugins-good
  • chturne/gst-plugins-good
  • vivia/gst-plugins-good
  • Bjorkstrom/gst-plugins-good
  • JimmyOhn/gst-plugins-good
  • gunsungithub/gst-plugins-good
  • xhaakon/gst-plugins-good
  • den_erpel/gst-plugins-good
  • mchehab_kernel/gst-plugins-good
  • thaytan/gst-plugins-good
  • pH5/gst-plugins-good
  • julian/gst-plugins-good
  • ebassi/gst-plugins-good
  • dank/gst-plugins-good
  • PanMichal/gst-plugins-good
  • ahamedsajeer.15/gst-plugins-good
  • lord.jacold/gst-plugins-good
  • kevinbing.song/gst-plugins-good
  • wonchul/gst-plugins-good
  • bsu/gst-plugins-good
  • okuoku/gst-plugins-good
  • GstBlub/gst-plugins-good
  • dannys/gst-plugins-good
  • thiagossantos/gst-plugins-good
  • mol/gst-plugins-good
  • Dmt/gst-plugins-good
  • leio/gst-plugins-good
  • dhobsong/gst-plugins-good
  • vjaquez/gst-plugins-good
  • dv1/gst-plugins-good
  • Freyr/gst-plugins-good
  • marcosk/gst-plugins-good
  • sancane/gst-plugins-good
  • jcelaya/gst-plugins-good
  • knut.tidemann/gst-plugins-good
  • staples255/gst-plugins-good
  • dougnazar/gst-plugins-good
  • He_Junyan/gst-plugins-good
  • amrmahdi/gst-plugins-good
  • philippefoubert/gst-plugins-good
  • sbaath/gst-plugins-good
  • springermac/gst-plugins-good
  • skanowitz/gst-plugins-good
  • dabrain34/gst-plugins-good
  • HuQian/gst-plugins-good
  • brechtvr0me/gst-plugins-good
  • cmclar/gst-plugins-good
  • fuweitax/gst-plugins-good
  • Jacquemart/gst-plugins-good
  • ihalip/gst-plugins-good
  • aogun.china/gst-plugins-good
  • goranjn/gst-plugins-good
  • fclaramonte/gst-plugins-good
  • milianw/gst-plugins-good
  • vrplumber/gst-plugins-good
  • cap/gst-plugins-good
  • andrew.voznytsa/gst-plugins-good
  • jfcarp/gst-plugins-good
  • JoakimJ/gst-plugins-good
  • Swap-File/gst-plugins-good
  • danimo/gst-plugins-good
  • alexashley/gst-plugins-good
  • winand.seldeslachts/gst-plugins-good
  • dvzrv/gst-plugins-good
  • pogojotz/gst-plugins-good
  • alexander.lapajne/gst-plugins-good
  • redstar/gst-plugins-good
  • nazar-pc/gst-plugins-good
  • zfigura/gst-plugins-good
  • Buora/gst-plugins-good
  • DuBistKomisch/gst-plugins-good
  • johan-bjareholt/gst-plugins-good
  • ebnerm/gst-plugins-good
  • xiezhaoxuan/gst-plugins-good
  • eberjand/gst-plugins-good
  • paulyc/gst-plugins-good
  • kztslee/gst-plugins-good
  • gordonhart/gst-plugins-good
  • StefanBruens/gst-plugins-good
  • kkangshawn/gst-plugins-good
  • kay0u/gst-plugins-good
  • JaredHu/gst-plugins-good
  • yan3nian/gst-plugins-good
  • kay0u1/gst-plugins-good
  • rambden/gst-plugins-good
  • dpurgin/gst-plugins-good
  • TheMuso/gst-plugins-good
  • Knopp/gst-plugins-good
  • ullysses.a.eoff/gst-plugins-good
  • 4kevinking/gst-plugins-good
  • Hosang/gst-plugins-good
  • marex/gst-plugins-good
  • trollkarlen/gst-plugins-good
  • jedevc/gst-plugins-good
  • appteamlover/gst-plugins-good
  • yishai1999/gst-plugins-good
  • andrey-khamukhin/gst-plugins-good
  • mdzik/gst-plugins-good
  • florent.thiery/gst-plugins-good
  • rickylineow/gst-plugins-good
  • jlaheurte/gst-plugins-good
  • SanchayanMaity/gst-plugins-good
  • ponmadasamy/gst-plugins-good
  • senatoreg/gst-plugins-good
  • id_est/gst-plugins-good
  • Rafostar/gst-plugins-good
  • gstreamer-release-bot/gst-plugins-good
  • bastienr/gst-plugins-good
  • dong9/gst-plugins-good
  • wtfrank/gst-plugins-good
  • saidinesh5/gst-plugins-good
  • mexxik/gst-plugins-good
  • quaresma.jose/gst-plugins-good
  • ChrisDuncan/gst-plugins-good
  • andrzej.p/gst-plugins-good
  • TobiasR/gst-plugins-good
  • Olssdani/gst-plugins-good
  • nacho.resa/gst-plugins-good
  • vicamo/gst-plugins-good
  • ignapk/gst-plugins-good
  • calvaris/gst-plugins-good
  • m.tretter/gst-plugins-good
  • boosth/gst-plugins-good
  • ashley-b/gst-plugins-good
  • i-tsygankov/gst-plugins-good
  • q66/gst-plugins-good
  • nitroxis/gst-plugins-good
  • whoozle/gst-plugins-good
  • dude/gst-plugins-good
  • mildsunrise/gst-plugins-good
  • sid.sethupathi/gst-plugins-good
  • valbok/gst-plugins-good
  • crziter/gst-plugins-good
  • AdvanceSoftware/gst-plugins-good
  • castroadrianitha/gst-plugins-good
  • Nei/gst-plugins-good
  • dwlsalmeida/gst-plugins-good
  • Roopang/gst-plugins-good
  • perfn/gst-plugins-good
  • witaly.iwanow/gst-plugins-good
  • Sidraya/gst-plugins-good
  • ybandou/gst-plugins-good
  • MylesInglis/gst-plugins-good
  • Ded_Zerom/gst-plugins-good
  • aslobodeniuk/gst-plugins-good
  • jfelder/gst-plugins-good
  • Paul_Fee_JCI/gst-plugins-good
  • ruslank/gst-plugins-good
  • brad0/gst-plugins-good
  • Hejsil/gst-plugins-good
  • vivienne/gst-plugins-good
  • pldin601/gst-plugins-good
  • danielknobe/gst-plugins-good
  • aniket_fti/gst-plugins-good
  • zhao-gang/gst-plugins-good
  • hq/gst-plugins-good
  • daniels/gst-plugins-good
  • tobire42/gst-plugins-good
  • ssdeng6812/gst-plugins-good
  • knorth55/gst-plugins-good
  • jinboson/gst-plugins-good
  • xrayzh/gst-plugins-good
  • cnhzcy14/gst-plugins-good
  • yuri.fedoseev/gst-plugins-good
  • Zhipeng/gst-plugins-good
  • vnguyentrong/gst-plugins-good
210 results
Show changes
Commits on Source (3)
  • Edward Hervey's avatar
    avidemux: Avoid potential double-free · 619457ae
    Edward Hervey authored and Edward Hervey's avatar Edward Hervey committed
    stream->name was being freed (without being NULL-ed) before we were certain it
    would be set again.
    
    CID #1456071
    
    Part-of: <gst-plugins-good!582>
    619457ae
  • Edward Hervey's avatar
    videbox: Use MIN instead of CLAMP for uint · 756f390f
    Edward Hervey authored and GStreamer Marge Bot's avatar GStreamer Marge Bot committed
    an unsigned int is always positive.
    
    CID #206207
    CID #206208
    CID #206209
    CID #206210
    CID #206211
    
    Part-of: <!583>
    756f390f
  • Sebastian Dröge's avatar
    imagefreeze: Handle flushing correctly · e5feaa76
    Sebastian Dröge authored and GStreamer Marge Bot's avatar GStreamer Marge Bot committed
    First of all get rid of the atomic seeking boolean, which was only ever
    set and never read. Replace it with a flushing boolean that is used in
    the loop function to distinguish no buffer because of flushing and no
    buffer because of an error as otherwise we could end up in a
    GST_FLOW_ERROR case during flushing.
    
    Also only reset the state of imagefreeze in flush-stop when all
    processing is stopped instead of doing it as part of flush-start.
    
    And last, get a reference to the imagefreeze buffer in the loop function
    in the very beginning and work from that as otherwise it could in theory
    be replaced or set to NULL in the meantime as we release and re-take the
    mutex a couple of times during the loop function.
    
    Part-of: <!580>
    e5feaa76
......@@ -2227,7 +2227,8 @@ gst_avi_demux_parse_stream (GstAviDemux * avi, GstBuffer * buf)
}
break;
case GST_RIFF_TAG_strn:
g_free (stream->name);
{
gchar *stream_name = NULL;
gst_buffer_map (sub, &map, GST_MAP_READ);
......@@ -2237,12 +2238,16 @@ gst_avi_demux_parse_stream (GstAviDemux * avi, GstBuffer * buf)
map.data, map.size);
if (gst_tag_list_get_string (avi->globaltags, GST_TAG_TITLE,
&stream->name))
GST_DEBUG_OBJECT (avi, "stream name: %s", stream->name);
&stream_name)) {
GST_DEBUG_OBJECT (avi, "stream name: %s", stream_name);
g_free (stream->name);
stream->name = stream_name;
}
gst_buffer_unmap (sub, &map);
gst_buffer_unref (sub);
sub = NULL;
}
break;
case GST_RIFF_IDIT:
gst_avi_demux_parse_idit (avi, sub);
......
......@@ -190,14 +190,13 @@ gst_image_freeze_reset (GstImageFreeze * self)
gst_segment_init (&self->segment, GST_FORMAT_TIME);
self->need_segment = TRUE;
self->flushing = TRUE;
self->negotiated_framerate = FALSE;
self->fps_n = self->fps_d = 0;
self->offset = 0;
self->seqnum = 0;
g_mutex_unlock (&self->lock);
g_atomic_int_set (&self->seeking, 0);
}
static gboolean
......@@ -659,7 +658,10 @@ gst_image_freeze_src_event (GstPad * pad, GstObject * parent, GstEvent * event)
if (flush) {
GstEvent *e;
g_atomic_int_set (&self->seeking, 1);
g_mutex_lock (&self->lock);
self->flushing = TRUE;
g_mutex_unlock (&self->lock);
e = gst_event_new_flush_start ();
gst_event_set_seqnum (e, seqnum);
gst_pad_push_event (self->srcpad, e);
......@@ -677,6 +679,7 @@ gst_image_freeze_src_event (GstPad * pad, GstObject * parent, GstEvent * event)
last_stop = self->segment.position;
start_task = self->buffer != NULL;
self->flushing = FALSE;
g_mutex_unlock (&self->lock);
if (flush) {
......@@ -685,7 +688,6 @@ gst_image_freeze_src_event (GstPad * pad, GstObject * parent, GstEvent * event)
e = gst_event_new_flush_stop (TRUE);
gst_event_set_seqnum (e, seqnum);
gst_pad_push_event (self->srcpad, e);
g_atomic_int_set (&self->seeking, 0);
}
if (flags & GST_SEEK_FLAG_SEGMENT) {
......@@ -715,8 +717,18 @@ gst_image_freeze_src_event (GstPad * pad, GstObject * parent, GstEvent * event)
break;
}
case GST_EVENT_FLUSH_START:
g_mutex_lock (&self->lock);
self->flushing = TRUE;
g_mutex_unlock (&self->lock);
ret = gst_pad_push_event (self->sinkpad, event);
break;
case GST_EVENT_FLUSH_STOP:
gst_image_freeze_reset (self);
/* fall through */
g_mutex_lock (&self->lock);
self->flushing = FALSE;
g_mutex_unlock (&self->lock);
ret = gst_pad_push_event (self->sinkpad, event);
break;
default:
ret = gst_pad_push_event (self->sinkpad, event);
break;
......@@ -815,18 +827,31 @@ gst_image_freeze_src_loop (GstPad * pad)
gboolean first = FALSE;
g_mutex_lock (&self->lock);
if (!self->buffer) {
if (self->flushing) {
GST_DEBUG_OBJECT (pad, "Flushing");
flow_ret = GST_FLOW_FLUSHING;
g_mutex_unlock (&self->lock);
goto pause_task;
} else if (!self->buffer) {
GST_ERROR_OBJECT (pad, "Have no buffer yet");
flow_ret = GST_FLOW_ERROR;
g_mutex_unlock (&self->lock);
goto pause_task;
}
g_assert (self->buffer);
/* Take a new reference of the buffer here so we're guaranteed to have one
* in all the following code even if it disappears while we temporarily
* unlock the mutex */
buffer = gst_buffer_ref (self->buffer);
if (gst_pad_check_reconfigure (self->srcpad)) {
GstCaps *buffer_caps = gst_caps_ref (self->buffer_caps);
g_mutex_unlock (&self->lock);
if (!gst_image_freeze_sink_setcaps (self, buffer_caps)) {
gst_caps_unref (buffer_caps);
gst_buffer_unref (buffer);
gst_pad_mark_reconfigure (self->srcpad);
flow_ret = GST_FLOW_NOT_NEGOTIATED;
goto pause_task;
......@@ -840,13 +865,14 @@ gst_image_freeze_src_loop (GstPad * pad)
GST_DEBUG_OBJECT (pad, "Buffers left %d", self->num_buffers_left);
if (self->num_buffers_left == 0) {
flow_ret = GST_FLOW_EOS;
gst_buffer_unref (buffer);
g_mutex_unlock (&self->lock);
goto pause_task;
} else {
self->num_buffers_left--;
}
}
buffer = gst_buffer_copy (self->buffer);
buffer = gst_buffer_make_writable (buffer);
g_mutex_unlock (&self->lock);
if (self->need_segment) {
......@@ -1001,6 +1027,9 @@ gst_image_freeze_change_state (GstElement * element, GstStateChange transition)
switch (transition) {
case GST_STATE_CHANGE_READY_TO_PAUSED:
gst_image_freeze_reset (self);
g_mutex_lock (&self->lock);
self->flushing = FALSE;
g_mutex_unlock (&self->lock);
break;
case GST_STATE_CHANGE_PAUSED_TO_READY:
gst_pad_stop_task (self->srcpad);
......
......@@ -65,9 +65,7 @@ struct _GstImageFreeze
guint64 offset;
/* TRUE if currently doing a flushing seek, protected
* by srcpad's stream lock */
gint seeking;
gboolean flushing;
};
struct _GstImageFreezeClass
......
......@@ -147,7 +147,7 @@ fill_ayuv (GstVideoBoxFill fill_type, guint b_alpha,
width = GST_VIDEO_FRAME_WIDTH (frame);
height = GST_VIDEO_FRAME_HEIGHT (frame);
b_alpha = CLAMP (b_alpha, 0, 255);
b_alpha = MIN (b_alpha, 255);
if (sdtv)
empty_pixel = GUINT32_FROM_BE ((b_alpha << 24) |
......@@ -1695,7 +1695,7 @@ copy_i420_ayuv (guint i_alpha, GstVideoFrame * dest_frame,
srcU = srcU + (src_y / 2) * src_strideU + src_x / 2;
srcV = srcV + (src_y / 2) * src_strideV + src_x / 2;
i_alpha = CLAMP (i_alpha, 0, 255);
i_alpha = MIN (i_alpha, 255);
if (src_sdtv != dest_sdtv) {
gint i, j, uv_idx;
......@@ -1779,7 +1779,7 @@ fill_rgb32 (GstVideoBoxFill fill_type, guint b_alpha,
p[2] = GST_VIDEO_FRAME_COMP_OFFSET (frame, 1);
p[3] = GST_VIDEO_FRAME_COMP_OFFSET (frame, 2);
b_alpha = CLAMP (b_alpha, 0, 255);
b_alpha = MIN (b_alpha, 255);
if (GST_VIDEO_FRAME_N_COMPONENTS (frame) == 4) {
empty_pixel = GUINT32_FROM_LE ((b_alpha << (p[0] * 8)) |
......@@ -1886,7 +1886,7 @@ copy_rgb32 (guint i_alpha, GstVideoFrame * dest_frame,
}
} else if (out_alpha && !packed_in) {
w *= 4;
i_alpha = CLAMP (i_alpha, 0, 255);
i_alpha = MIN (i_alpha, 255);
for (i = 0; i < h; i++) {
for (j = 0; j < w; j += 4) {
......@@ -1899,7 +1899,7 @@ copy_rgb32 (guint i_alpha, GstVideoFrame * dest_frame,
src += src_stride;
}
} else if (out_alpha && packed_in) {
i_alpha = CLAMP (i_alpha, 0, 255);
i_alpha = MIN (i_alpha, 255);
for (i = 0; i < h; i++) {
for (j = 0; j < w; j++) {
......@@ -1995,7 +1995,7 @@ copy_rgb32_ayuv (guint i_alpha, GstVideoFrame * dest_frame,
}
} else if (!packed_in) {
w *= 4;
i_alpha = CLAMP (i_alpha, 0, 255);
i_alpha = MIN (i_alpha, 255);
for (i = 0; i < h; i++) {
for (j = 0; j < w; j += 4) {
......@@ -2017,7 +2017,7 @@ copy_rgb32_ayuv (guint i_alpha, GstVideoFrame * dest_frame,
src += src_stride;
}
} else {
i_alpha = CLAMP (i_alpha, 0, 255);
i_alpha = MIN (i_alpha, 255);
for (i = 0; i < h; i++) {
for (j = 0; j < w; j++) {
......