return TRUE;
}
-
-/* Clean up the libpng structures */
-static gboolean
-gst_pngdec_reset (GstVideoDecoder * decoder, gboolean hard)
-{
- gst_pngdec_stop (decoder);
- gst_pngdec_start (decoder);
-
- return TRUE;
-}
-
static gboolean
gst_pngdec_libpng_init (GstPngDec * pngdec)
{
}
}
-static gboolean
-gst_pngdec_start (GstVideoDecoder * decoder)
-{
- GstPngDec *pngdec = (GstPngDec *) decoder;
-
- gst_pngdec_libpng_init (pngdec);
-
- return TRUE;
-}
-static gboolean
-gst_pngdec_stop (GstVideoDecoder * decoder)
+static void
+gst_pngdec_libpng_clear (GstPngDec * pngdec)
{
- GstPngDec *pngdec = (GstPngDec *) decoder;
png_infopp info = NULL, endinfo = NULL;
GST_LOG ("cleaning up libpng structures");
}
pngdec->color_type = -1;
+}
+
+static gboolean
+gst_pngdec_start (GstVideoDecoder * decoder)
+{
+ GstPngDec *pngdec = (GstPngDec *) decoder;
+
+ gst_pngdec_libpng_init (pngdec);
+
+ return TRUE;
+}
+
+static gboolean
+gst_pngdec_stop (GstVideoDecoder * decoder)
+{
+ GstPngDec *pngdec = (GstPngDec *) decoder;
+
+ gst_pngdec_libpng_clear (pngdec);
if (pngdec->input_state) {
gst_video_codec_state_unref (pngdec->input_state);
return TRUE;
}
+
+/* Clean up the libpng structures */
+static gboolean
+gst_pngdec_reset (GstVideoDecoder * decoder, gboolean hard)
+{
+ gst_pngdec_libpng_clear (decoder);
+ gst_pngdec_libpng_init (decoder);
+
+ return TRUE;
+}