mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-11 09:55:36 +00:00
gdkpixbufdec: modify wrong packetized mode logic
packetized mode is being set when framerate is being set which is not correct. Changing the same by checking the input segement format. If input segment is in TIME it is Packetized, and if it is in BYTES it is not. https://bugzilla.gnome.org/show_bug.cgi?id=736252
This commit is contained in:
parent
90ccd8212a
commit
89b9313e20
2 changed files with 15 additions and 7 deletions
|
@ -215,6 +215,7 @@ gst_gdk_pixbuf_dec_init (GstGdkPixbufDec * filter)
|
||||||
|
|
||||||
filter->last_timestamp = GST_CLOCK_TIME_NONE;
|
filter->last_timestamp = GST_CLOCK_TIME_NONE;
|
||||||
filter->pixbuf_loader = NULL;
|
filter->pixbuf_loader = NULL;
|
||||||
|
filter->packetized = FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
|
@ -427,12 +428,20 @@ gst_gdk_pixbuf_dec_sink_event (GstPad * pad, GstObject * parent,
|
||||||
pixbuf->pending_events = NULL;
|
pixbuf->pending_events = NULL;
|
||||||
/* Fall through */
|
/* Fall through */
|
||||||
case GST_EVENT_SEGMENT:
|
case GST_EVENT_SEGMENT:
|
||||||
|
{
|
||||||
|
const GstSegment *segment;
|
||||||
|
gst_event_parse_segment (event, &segment);
|
||||||
|
if (segment->format == GST_FORMAT_BYTES)
|
||||||
|
pixbuf->packetized = FALSE;
|
||||||
|
else
|
||||||
|
pixbuf->packetized = TRUE;
|
||||||
if (pixbuf->pixbuf_loader != NULL) {
|
if (pixbuf->pixbuf_loader != NULL) {
|
||||||
gdk_pixbuf_loader_close (pixbuf->pixbuf_loader, NULL);
|
gdk_pixbuf_loader_close (pixbuf->pixbuf_loader, NULL);
|
||||||
g_object_unref (G_OBJECT (pixbuf->pixbuf_loader));
|
g_object_unref (G_OBJECT (pixbuf->pixbuf_loader));
|
||||||
pixbuf->pixbuf_loader = NULL;
|
pixbuf->pixbuf_loader = NULL;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -482,9 +491,7 @@ gst_gdk_pixbuf_dec_chain (GstPad * pad, GstObject * parent, GstBuffer * buf)
|
||||||
&error))
|
&error))
|
||||||
goto error;
|
goto error;
|
||||||
|
|
||||||
/* packetised mode? *//* FIXME: shouln't this be fps_d != 0, since 0/1
|
if (filter->packetized == TRUE) {
|
||||||
* might be packetised mode but variable framerate */
|
|
||||||
if (filter->in_fps_n != 0) {
|
|
||||||
gdk_pixbuf_loader_close (filter->pixbuf_loader, NULL);
|
gdk_pixbuf_loader_close (filter->pixbuf_loader, NULL);
|
||||||
ret = gst_gdk_pixbuf_dec_flush (filter);
|
ret = gst_gdk_pixbuf_dec_flush (filter);
|
||||||
g_object_unref (filter->pixbuf_loader);
|
g_object_unref (filter->pixbuf_loader);
|
||||||
|
|
|
@ -47,14 +47,15 @@ struct _GstGdkPixbufDec
|
||||||
|
|
||||||
GstPad *sinkpad, *srcpad;
|
GstPad *sinkpad, *srcpad;
|
||||||
|
|
||||||
GstClockTime last_timestamp;
|
GstClockTime last_timestamp;
|
||||||
GdkPixbufLoader *pixbuf_loader;
|
GdkPixbufLoader *pixbuf_loader;
|
||||||
|
|
||||||
gint in_fps_n, in_fps_d;
|
gint in_fps_n, in_fps_d;
|
||||||
|
|
||||||
GstVideoInfo info;
|
GstVideoInfo info;
|
||||||
GstBufferPool *pool;
|
GstBufferPool *pool;
|
||||||
GList *pending_events;
|
GList *pending_events;
|
||||||
|
gboolean packetized;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct _GstGdkPixbufDecClass
|
struct _GstGdkPixbufDecClass
|
||||||
|
|
Loading…
Reference in a new issue