summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim-Philipp Müller <tim@centricular.com>2015-08-15 11:12:05 +0100
committerTim-Philipp Müller <tim@centricular.com>2015-08-15 11:21:02 +0100
commit98527a6ea22198db575822dc8201cacea1d5d8bb (patch)
tree9f2f69793b9e9f1a59401f248651e20353b7c17d
parent0e10e9295376282036fef0a2129101d7fae9bb94 (diff)
vp8enc, vp9enc: reset multipass file index when stopping encoder
Fixes multipass encoding when re-using the same element/pipeline for subsequent encoding runs. https://bugzilla.gnome.org/show_bug.cgi?id=747728
-rw-r--r--ext/vpx/gstvp8enc.c4
-rw-r--r--ext/vpx/gstvp9enc.c4
2 files changed, 8 insertions, 0 deletions
diff --git a/ext/vpx/gstvp8enc.c b/ext/vpx/gstvp8enc.c
index f203cdc07..cfb5a2f6e 100644
--- a/ext/vpx/gstvp8enc.c
+++ b/ext/vpx/gstvp8enc.c
@@ -1461,6 +1461,10 @@ gst_vp8_enc_stop (GstVideoEncoder * video_encoder)
gst_tag_setter_reset_tags (GST_TAG_SETTER (encoder));
+ g_free (encoder->multipass_cache_file);
+ encoder->multipass_cache_file = NULL;
+ encoder->multipass_cache_idx = 0;
+
return TRUE;
}
diff --git a/ext/vpx/gstvp9enc.c b/ext/vpx/gstvp9enc.c
index 08ec6f2b3..ec2ea2163 100644
--- a/ext/vpx/gstvp9enc.c
+++ b/ext/vpx/gstvp9enc.c
@@ -1434,6 +1434,10 @@ gst_vp9_enc_stop (GstVideoEncoder * video_encoder)
gst_tag_setter_reset_tags (GST_TAG_SETTER (encoder));
+ g_free (encoder->multipass_cache_file);
+ encoder->multipass_cache_file = NULL;
+ encoder->multipass_cache_idx = 0;
+
return TRUE;
}