From 5ac982f87266bfe01c48b90ace144937b316e4ec Mon Sep 17 00:00:00 2001 From: Debarshi Ray Date: Wed, 24 Oct 2012 19:02:21 +0200 Subject: [PATCH 1/5] Fix target-bitrate for vp8enc --- ...time-fix-the-default-target-bitrate-.patch | 35 ++++++++++++ ...enc-Fix-default-target-bitrate-value.patch | 53 +++++++++++++++++++ gstreamer1-plugins-good.spec | 9 +++- 3 files changed, 96 insertions(+), 1 deletion(-) create mode 100644 0001-vp8enc-And-this-time-fix-the-default-target-bitrate-.patch create mode 100644 0001-vp8enc-Fix-default-target-bitrate-value.patch diff --git a/0001-vp8enc-And-this-time-fix-the-default-target-bitrate-.patch b/0001-vp8enc-And-this-time-fix-the-default-target-bitrate-.patch new file mode 100644 index 0000000..0ff9b4d --- /dev/null +++ b/0001-vp8enc-And-this-time-fix-the-default-target-bitrate-.patch @@ -0,0 +1,35 @@ +From 7ceef442a7d84c660d370c8e206503c1d4d8ab0f Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= +Date: Mon, 15 Oct 2012 15:36:04 +0200 +Subject: [PATCH] vp8enc: And this time fix the default target-bitrate value + for real + +--- + ext/vpx/gstvp8enc.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/ext/vpx/gstvp8enc.c b/ext/vpx/gstvp8enc.c +index 2ae7a32..1f46163 100644 +--- a/ext/vpx/gstvp8enc.c ++++ b/ext/vpx/gstvp8enc.c +@@ -441,7 +441,7 @@ gst_vp8_enc_class_init (GstVP8EncClass * klass) + g_object_class_install_property (gobject_class, PROP_RC_TARGET_BITRATE, + g_param_spec_int ("target-bitrate", "Target bitrate", + "Target bitrate (in bits/sec)", +- 0, G_MAXINT, DEFAULT_RC_TARGET_BITRATE / 1000, ++ 0, G_MAXINT, DEFAULT_RC_TARGET_BITRATE, + (GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS))); + + g_object_class_install_property (gobject_class, PROP_RC_MIN_QUANTIZER, +@@ -565,7 +565,7 @@ gst_vp8_enc_class_init (GstVP8EncClass * klass) + "Coding layer target bitrates", + "Target bitrates for coding layers (one per layer, decreasing)", + g_param_spec_int ("target-bitrate", "Target bitrate", +- "Target bitrate", 0, G_MAXINT, DEFAULT_RC_TARGET_BITRATE / 1000, ++ "Target bitrate", 0, G_MAXINT, DEFAULT_RC_TARGET_BITRATE, + G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS), + G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); + +-- +1.7.12.1 + diff --git a/0001-vp8enc-Fix-default-target-bitrate-value.patch b/0001-vp8enc-Fix-default-target-bitrate-value.patch new file mode 100644 index 0000000..f939bc4 --- /dev/null +++ b/0001-vp8enc-Fix-default-target-bitrate-value.patch @@ -0,0 +1,53 @@ +From 1962384cffc037f704c586c85c0cf590c68f8d89 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= +Date: Mon, 15 Oct 2012 15:30:33 +0200 +Subject: [PATCH] vp8enc: Fix default target-bitrate value + +--- + ext/vpx/gstvp8enc.c | 9 +++++---- + 1 file changed, 5 insertions(+), 4 deletions(-) + +diff --git a/ext/vpx/gstvp8enc.c b/ext/vpx/gstvp8enc.c +index f465174..2ae7a32 100644 +--- a/ext/vpx/gstvp8enc.c ++++ b/ext/vpx/gstvp8enc.c +@@ -441,7 +441,7 @@ gst_vp8_enc_class_init (GstVP8EncClass * klass) + g_object_class_install_property (gobject_class, PROP_RC_TARGET_BITRATE, + g_param_spec_int ("target-bitrate", "Target bitrate", + "Target bitrate (in bits/sec)", +- 0, G_MAXINT, DEFAULT_RC_TARGET_BITRATE, ++ 0, G_MAXINT, DEFAULT_RC_TARGET_BITRATE / 1000, + (GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS))); + + g_object_class_install_property (gobject_class, PROP_RC_MIN_QUANTIZER, +@@ -565,7 +565,7 @@ gst_vp8_enc_class_init (GstVP8EncClass * klass) + "Coding layer target bitrates", + "Target bitrates for coding layers (one per layer, decreasing)", + g_param_spec_int ("target-bitrate", "Target bitrate", +- "Target bitrate", 0, G_MAXINT, DEFAULT_RC_TARGET_BITRATE, ++ "Target bitrate", 0, G_MAXINT, DEFAULT_RC_TARGET_BITRATE / 1000, + G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS), + G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); + +@@ -724,7 +724,7 @@ gst_vp8_enc_init (GstVP8Enc * gst_vp8_enc) + } + + gst_vp8_enc->cfg.rc_end_usage = DEFAULT_RC_END_USAGE; +- gst_vp8_enc->cfg.rc_target_bitrate = DEFAULT_RC_TARGET_BITRATE; ++ gst_vp8_enc->cfg.rc_target_bitrate = DEFAULT_RC_TARGET_BITRATE / 1000; + gst_vp8_enc->rc_target_bitrate_set = FALSE; + gst_vp8_enc->cfg.rc_min_quantizer = DEFAULT_RC_MIN_QUANTIZER; + gst_vp8_enc->cfg.rc_max_quantizer = DEFAULT_RC_MAX_QUANTIZER; +@@ -1504,7 +1504,8 @@ gst_vp8_enc_set_format (GstVideoEncoder * video_encoder, + if (!encoder->rc_target_bitrate_set) + encoder->cfg.rc_target_bitrate = + gst_util_uint64_scale (DEFAULT_RC_TARGET_BITRATE, +- GST_VIDEO_INFO_WIDTH (info) * GST_VIDEO_INFO_HEIGHT (info), 320 * 240); ++ GST_VIDEO_INFO_WIDTH (info) * GST_VIDEO_INFO_HEIGHT (info), ++ 320 * 240 * 1000); + + encoder->cfg.g_w = GST_VIDEO_INFO_WIDTH (info); + encoder->cfg.g_h = GST_VIDEO_INFO_HEIGHT (info); +-- +1.7.12.1 + diff --git a/gstreamer1-plugins-good.spec b/gstreamer1-plugins-good.spec index 966607c..53dc051 100644 --- a/gstreamer1-plugins-good.spec +++ b/gstreamer1-plugins-good.spec @@ -9,12 +9,14 @@ Name: gstreamer1-plugins-good Version: 1.0.1 -Release: 1%{?dist} +Release: 2%{?dist} Summary: GStreamer plugins with good code and licensing License: LGPLv2+ URL: http://gstreamer.freedesktop.org/ Source0: http://gstreamer.freedesktop.org/src/gst-plugins-good/gst-plugins-good-%{version}.tar.xz +Patch0: 0001-vp8enc-Fix-default-target-bitrate-value.patch +Patch1: 0001-vp8enc-And-this-time-fix-the-default-target-bitrate-.patch BuildRequires: gstreamer1-devel >= %{version} BuildRequires: gstreamer1-plugins-base-devel >= %{version} @@ -83,6 +85,8 @@ to be installed. %prep %setup -q -n gst-plugins-good-%{version} +%patch0 -p1 +%patch1 -p1 %build @@ -199,6 +203,9 @@ find $RPM_BUILD_ROOT -name '*.la' -exec rm -f {} ';' %changelog +* Wed Oct 24 2012 Debarshi Ray - 1.0.1-2 +- Fix target-bitrate for vp8enc + * Sun Oct 7 2012 Brian Pepple - 1.0.1-1 - Update to 1.0.1 From f03171829ee49b2d7f5256c7a5b2b4b855b50c48 Mon Sep 17 00:00:00 2001 From: Brian Pepple Date: Thu, 25 Oct 2012 11:37:37 -0400 Subject: [PATCH 2/5] Update to 1.0.2 Drop upstream patches since they are included in latest release. --- .gitignore | 1 + ...time-fix-the-default-target-bitrate-.patch | 35 ------------ ...enc-Fix-default-target-bitrate-value.patch | 53 ------------------- gstreamer1-plugins-good.spec | 12 ++--- sources | 2 +- 5 files changed, 8 insertions(+), 95 deletions(-) delete mode 100644 0001-vp8enc-And-this-time-fix-the-default-target-bitrate-.patch delete mode 100644 0001-vp8enc-Fix-default-target-bitrate-value.patch diff --git a/.gitignore b/.gitignore index 5256a26..0faf140 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,4 @@ /gst-plugins-good-0.11.99.tar.xz /gst-plugins-good-1.0.0.tar.xz /gst-plugins-good-1.0.1.tar.xz +/gst-plugins-good-1.0.2.tar.xz diff --git a/0001-vp8enc-And-this-time-fix-the-default-target-bitrate-.patch b/0001-vp8enc-And-this-time-fix-the-default-target-bitrate-.patch deleted file mode 100644 index 0ff9b4d..0000000 --- a/0001-vp8enc-And-this-time-fix-the-default-target-bitrate-.patch +++ /dev/null @@ -1,35 +0,0 @@ -From 7ceef442a7d84c660d370c8e206503c1d4d8ab0f Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= -Date: Mon, 15 Oct 2012 15:36:04 +0200 -Subject: [PATCH] vp8enc: And this time fix the default target-bitrate value - for real - ---- - ext/vpx/gstvp8enc.c | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/ext/vpx/gstvp8enc.c b/ext/vpx/gstvp8enc.c -index 2ae7a32..1f46163 100644 ---- a/ext/vpx/gstvp8enc.c -+++ b/ext/vpx/gstvp8enc.c -@@ -441,7 +441,7 @@ gst_vp8_enc_class_init (GstVP8EncClass * klass) - g_object_class_install_property (gobject_class, PROP_RC_TARGET_BITRATE, - g_param_spec_int ("target-bitrate", "Target bitrate", - "Target bitrate (in bits/sec)", -- 0, G_MAXINT, DEFAULT_RC_TARGET_BITRATE / 1000, -+ 0, G_MAXINT, DEFAULT_RC_TARGET_BITRATE, - (GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS))); - - g_object_class_install_property (gobject_class, PROP_RC_MIN_QUANTIZER, -@@ -565,7 +565,7 @@ gst_vp8_enc_class_init (GstVP8EncClass * klass) - "Coding layer target bitrates", - "Target bitrates for coding layers (one per layer, decreasing)", - g_param_spec_int ("target-bitrate", "Target bitrate", -- "Target bitrate", 0, G_MAXINT, DEFAULT_RC_TARGET_BITRATE / 1000, -+ "Target bitrate", 0, G_MAXINT, DEFAULT_RC_TARGET_BITRATE, - G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS), - G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); - --- -1.7.12.1 - diff --git a/0001-vp8enc-Fix-default-target-bitrate-value.patch b/0001-vp8enc-Fix-default-target-bitrate-value.patch deleted file mode 100644 index f939bc4..0000000 --- a/0001-vp8enc-Fix-default-target-bitrate-value.patch +++ /dev/null @@ -1,53 +0,0 @@ -From 1962384cffc037f704c586c85c0cf590c68f8d89 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= -Date: Mon, 15 Oct 2012 15:30:33 +0200 -Subject: [PATCH] vp8enc: Fix default target-bitrate value - ---- - ext/vpx/gstvp8enc.c | 9 +++++---- - 1 file changed, 5 insertions(+), 4 deletions(-) - -diff --git a/ext/vpx/gstvp8enc.c b/ext/vpx/gstvp8enc.c -index f465174..2ae7a32 100644 ---- a/ext/vpx/gstvp8enc.c -+++ b/ext/vpx/gstvp8enc.c -@@ -441,7 +441,7 @@ gst_vp8_enc_class_init (GstVP8EncClass * klass) - g_object_class_install_property (gobject_class, PROP_RC_TARGET_BITRATE, - g_param_spec_int ("target-bitrate", "Target bitrate", - "Target bitrate (in bits/sec)", -- 0, G_MAXINT, DEFAULT_RC_TARGET_BITRATE, -+ 0, G_MAXINT, DEFAULT_RC_TARGET_BITRATE / 1000, - (GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS))); - - g_object_class_install_property (gobject_class, PROP_RC_MIN_QUANTIZER, -@@ -565,7 +565,7 @@ gst_vp8_enc_class_init (GstVP8EncClass * klass) - "Coding layer target bitrates", - "Target bitrates for coding layers (one per layer, decreasing)", - g_param_spec_int ("target-bitrate", "Target bitrate", -- "Target bitrate", 0, G_MAXINT, DEFAULT_RC_TARGET_BITRATE, -+ "Target bitrate", 0, G_MAXINT, DEFAULT_RC_TARGET_BITRATE / 1000, - G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS), - G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); - -@@ -724,7 +724,7 @@ gst_vp8_enc_init (GstVP8Enc * gst_vp8_enc) - } - - gst_vp8_enc->cfg.rc_end_usage = DEFAULT_RC_END_USAGE; -- gst_vp8_enc->cfg.rc_target_bitrate = DEFAULT_RC_TARGET_BITRATE; -+ gst_vp8_enc->cfg.rc_target_bitrate = DEFAULT_RC_TARGET_BITRATE / 1000; - gst_vp8_enc->rc_target_bitrate_set = FALSE; - gst_vp8_enc->cfg.rc_min_quantizer = DEFAULT_RC_MIN_QUANTIZER; - gst_vp8_enc->cfg.rc_max_quantizer = DEFAULT_RC_MAX_QUANTIZER; -@@ -1504,7 +1504,8 @@ gst_vp8_enc_set_format (GstVideoEncoder * video_encoder, - if (!encoder->rc_target_bitrate_set) - encoder->cfg.rc_target_bitrate = - gst_util_uint64_scale (DEFAULT_RC_TARGET_BITRATE, -- GST_VIDEO_INFO_WIDTH (info) * GST_VIDEO_INFO_HEIGHT (info), 320 * 240); -+ GST_VIDEO_INFO_WIDTH (info) * GST_VIDEO_INFO_HEIGHT (info), -+ 320 * 240 * 1000); - - encoder->cfg.g_w = GST_VIDEO_INFO_WIDTH (info); - encoder->cfg.g_h = GST_VIDEO_INFO_HEIGHT (info); --- -1.7.12.1 - diff --git a/gstreamer1-plugins-good.spec b/gstreamer1-plugins-good.spec index 53dc051..106fcff 100644 --- a/gstreamer1-plugins-good.spec +++ b/gstreamer1-plugins-good.spec @@ -8,15 +8,13 @@ %endif Name: gstreamer1-plugins-good -Version: 1.0.1 -Release: 2%{?dist} +Version: 1.0.2 +Release: 1%{?dist} Summary: GStreamer plugins with good code and licensing License: LGPLv2+ URL: http://gstreamer.freedesktop.org/ Source0: http://gstreamer.freedesktop.org/src/gst-plugins-good/gst-plugins-good-%{version}.tar.xz -Patch0: 0001-vp8enc-Fix-default-target-bitrate-value.patch -Patch1: 0001-vp8enc-And-this-time-fix-the-default-target-bitrate-.patch BuildRequires: gstreamer1-devel >= %{version} BuildRequires: gstreamer1-plugins-base-devel >= %{version} @@ -85,8 +83,6 @@ to be installed. %prep %setup -q -n gst-plugins-good-%{version} -%patch0 -p1 -%patch1 -p1 %build @@ -203,6 +199,10 @@ find $RPM_BUILD_ROOT -name '*.la' -exec rm -f {} ';' %changelog +* Thu Oct 25 2012 Brian Pepple - 1.0.2-1 +- Update to 1.0.2 +- Drop upstream patches since they are included in latest release. + * Wed Oct 24 2012 Debarshi Ray - 1.0.1-2 - Fix target-bitrate for vp8enc diff --git a/sources b/sources index b624fb5..dca169f 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -30bc72d77d274289844e2138ca79c840 gst-plugins-good-1.0.1.tar.xz +13e487127d80fe20c868b3bbb2a17d9e gst-plugins-good-1.0.2.tar.xz From d9eef9abc4fcdb00f673ff79292ef41a1c3acfd1 Mon Sep 17 00:00:00 2001 From: Debarshi Ray Date: Fri, 2 Nov 2012 11:58:30 +0100 Subject: [PATCH 3/5] Fixes for vp8dec including GNOME #687376 --- ...cuit-gst_vp8_dec_handle_frame-if-key.patch | 40 +++++++++++++++++++ ...ly-return-if-opening-the-decoder-fai.patch | 26 ++++++++++++ gstreamer1-plugins-good.spec | 9 ++++- 3 files changed, 74 insertions(+), 1 deletion(-) create mode 100644 0001-vp8dec-Short-circuit-gst_vp8_dec_handle_frame-if-key.patch create mode 100644 0002-vp8dec-Immediately-return-if-opening-the-decoder-fai.patch diff --git a/0001-vp8dec-Short-circuit-gst_vp8_dec_handle_frame-if-key.patch b/0001-vp8dec-Short-circuit-gst_vp8_dec_handle_frame-if-key.patch new file mode 100644 index 0000000..4718a0f --- /dev/null +++ b/0001-vp8dec-Short-circuit-gst_vp8_dec_handle_frame-if-key.patch @@ -0,0 +1,40 @@ +From 3c216600f55351549573cf94be541fc6055db128 Mon Sep 17 00:00:00 2001 +From: Debarshi Ray +Date: Thu, 1 Nov 2012 22:02:39 +0100 +Subject: [PATCH 1/2] vp8dec: Short circuit gst_vp8_dec_handle_frame if + keyframe is missing + +https://bugzilla.gnome.org/show_bug.cgi?id=687376 +--- + ext/vpx/gstvp8dec.c | 7 +++++-- + 1 file changed, 5 insertions(+), 2 deletions(-) + +diff --git a/ext/vpx/gstvp8dec.c b/ext/vpx/gstvp8dec.c +index 9ec1771..7dcd75b 100644 +--- a/ext/vpx/gstvp8dec.c ++++ b/ext/vpx/gstvp8dec.c +@@ -415,7 +415,7 @@ open_codec (GstVP8Dec * dec, GstVideoCodecFrame * frame) + if (status != VPX_CODEC_OK || !stream_info.is_kf) { + GST_WARNING_OBJECT (dec, "No keyframe, skipping"); + gst_video_decoder_finish_frame (GST_VIDEO_DECODER (dec), frame); +- return GST_FLOW_OK; ++ return GST_FLOW_CUSTOM_SUCCESS_1; + } + + g_assert (dec->output_state == NULL); +@@ -483,8 +483,11 @@ gst_vp8_dec_handle_frame (GstVideoDecoder * decoder, GstVideoCodecFrame * frame) + + dec = GST_VP8_DEC (decoder); + +- if (!dec->decoder_inited) ++ if (!dec->decoder_inited) { + ret = open_codec (dec, frame); ++ if (ret == GST_FLOW_CUSTOM_SUCCESS_1) ++ return GST_FLOW_OK; ++ } + + deadline = gst_video_decoder_get_max_decode_time (decoder, frame); + if (deadline < 0) { +-- +1.7.12.1 + diff --git a/0002-vp8dec-Immediately-return-if-opening-the-decoder-fai.patch b/0002-vp8dec-Immediately-return-if-opening-the-decoder-fai.patch new file mode 100644 index 0000000..dd116f1 --- /dev/null +++ b/0002-vp8dec-Immediately-return-if-opening-the-decoder-fai.patch @@ -0,0 +1,26 @@ +From f0640f205cca974ccbe0550e76ab37f16b7c8821 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= +Date: Fri, 2 Nov 2012 09:34:25 +0100 +Subject: [PATCH 2/2] vp8dec: Immediately return if opening the decoder failed + +Instead of ignoring any errors. +--- + ext/vpx/gstvp8dec.c | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/ext/vpx/gstvp8dec.c b/ext/vpx/gstvp8dec.c +index 7dcd75b..b5b4aa3 100644 +--- a/ext/vpx/gstvp8dec.c ++++ b/ext/vpx/gstvp8dec.c +@@ -487,6 +487,8 @@ gst_vp8_dec_handle_frame (GstVideoDecoder * decoder, GstVideoCodecFrame * frame) + ret = open_codec (dec, frame); + if (ret == GST_FLOW_CUSTOM_SUCCESS_1) + return GST_FLOW_OK; ++ else if (ret != GST_FLOW_OK) ++ return ret; + } + + deadline = gst_video_decoder_get_max_decode_time (decoder, frame); +-- +1.7.12.1 + diff --git a/gstreamer1-plugins-good.spec b/gstreamer1-plugins-good.spec index 106fcff..3f23ece 100644 --- a/gstreamer1-plugins-good.spec +++ b/gstreamer1-plugins-good.spec @@ -9,12 +9,14 @@ Name: gstreamer1-plugins-good Version: 1.0.2 -Release: 1%{?dist} +Release: 2%{?dist} Summary: GStreamer plugins with good code and licensing License: LGPLv2+ URL: http://gstreamer.freedesktop.org/ Source0: http://gstreamer.freedesktop.org/src/gst-plugins-good/gst-plugins-good-%{version}.tar.xz +Patch0: 0001-vp8dec-Short-circuit-gst_vp8_dec_handle_frame-if-key.patch +Patch1: 0002-vp8dec-Immediately-return-if-opening-the-decoder-fai.patch BuildRequires: gstreamer1-devel >= %{version} BuildRequires: gstreamer1-plugins-base-devel >= %{version} @@ -83,6 +85,8 @@ to be installed. %prep %setup -q -n gst-plugins-good-%{version} +%patch0 -p1 +%patch1 -p1 %build @@ -199,6 +203,9 @@ find $RPM_BUILD_ROOT -name '*.la' -exec rm -f {} ';' %changelog +* Fri Nov 2 2012 Debarshi Ray - 1.0.2-2 +- Fixes for vp8dec including GNOME #687376 + * Thu Oct 25 2012 Brian Pepple - 1.0.2-1 - Update to 1.0.2 - Drop upstream patches since they are included in latest release. From 059a5e4d4ced2fcf4a14b548a89368a191f228c5 Mon Sep 17 00:00:00 2001 From: Debarshi Ray Date: Wed, 7 Nov 2012 17:08:25 +0100 Subject: [PATCH 4/5] Fixes for GNOME #687464 and #687793 --- ...nmap-or-finish_frame-an-invalid-GstB.patch | 61 +++++++++++++++++++ 0001-v4l2src-Check-for-obj-pool-NULL.patch | 37 +++++++++++ gstreamer1-plugins-good.spec | 9 ++- 3 files changed, 106 insertions(+), 1 deletion(-) create mode 100644 0001-speexdec-Don-t-unmap-or-finish_frame-an-invalid-GstB.patch create mode 100644 0001-v4l2src-Check-for-obj-pool-NULL.patch diff --git a/0001-speexdec-Don-t-unmap-or-finish_frame-an-invalid-GstB.patch b/0001-speexdec-Don-t-unmap-or-finish_frame-an-invalid-GstB.patch new file mode 100644 index 0000000..ce0eb21 --- /dev/null +++ b/0001-speexdec-Don-t-unmap-or-finish_frame-an-invalid-GstB.patch @@ -0,0 +1,61 @@ +From 0bf17544e3c2a9277975659ce6e52d265d9b3e8a Mon Sep 17 00:00:00 2001 +From: Debarshi Ray +Date: Fri, 2 Nov 2012 16:39:28 +0100 +Subject: [PATCH] speexdec: Don't unmap or finish_frame an invalid GstBuffer + +https://bugzilla.gnome.org/show_bug.cgi?id=687464 +--- + ext/speex/gstspeexdec.c | 17 ++++++++++------- + 1 file changed, 10 insertions(+), 7 deletions(-) + +diff --git a/ext/speex/gstspeexdec.c b/ext/speex/gstspeexdec.c +index 36cc68b..cd78804 100644 +--- a/ext/speex/gstspeexdec.c ++++ b/ext/speex/gstspeexdec.c +@@ -392,6 +392,7 @@ gst_speex_dec_parse_data (GstSpeexDec * dec, GstBuffer * buf) + /* now decode each frame, catering for unknown number of them (e.g. rtp) */ + for (i = 0; i < fpp; i++) { + GstBuffer *outbuf; ++ gboolean corrupted = FALSE; + gint ret; + + GST_LOG_OBJECT (dec, "decoding frame %d/%d, %d bits remaining", i, fpp, +@@ -425,18 +426,15 @@ gst_speex_dec_parse_data (GstSpeexDec * dec, GstBuffer * buf) + } else { + GST_WARNING_OBJECT (dec, "Unexpected end of stream found"); + } +- gst_audio_decoder_finish_frame (GST_AUDIO_DECODER (dec), NULL, 1); +- gst_buffer_unref (outbuf); ++ corrupted = TRUE; + } else if (ret == -2) { + GST_WARNING_OBJECT (dec, "Decoding error: corrupted stream?"); +- gst_audio_decoder_finish_frame (GST_AUDIO_DECODER (dec), NULL, 1); +- gst_buffer_unref (outbuf); ++ corrupted = TRUE; + } + + if (bits && speex_bits_remaining (bits) < 0) { + GST_WARNING_OBJECT (dec, "Decoding overflow: corrupted stream?"); +- gst_audio_decoder_finish_frame (GST_AUDIO_DECODER (dec), NULL, 1); +- gst_buffer_unref (outbuf); ++ corrupted = TRUE; + } + if (dec->header->nb_channels == 2) + speex_decode_stereo_int ((spx_int16_t *) map.data, dec->frame_size, +@@ -444,7 +442,12 @@ gst_speex_dec_parse_data (GstSpeexDec * dec, GstBuffer * buf) + + gst_buffer_unmap (outbuf, &map); + +- res = gst_audio_decoder_finish_frame (GST_AUDIO_DECODER (dec), outbuf, 1); ++ if (!corrupted) { ++ res = gst_audio_decoder_finish_frame (GST_AUDIO_DECODER (dec), outbuf, 1); ++ } else { ++ res = gst_audio_decoder_finish_frame (GST_AUDIO_DECODER (dec), NULL, 1); ++ gst_buffer_unref (outbuf); ++ } + + if (res != GST_FLOW_OK) { + GST_DEBUG_OBJECT (dec, "flow: %s", gst_flow_get_name (res)); +-- +1.7.12.1 + diff --git a/0001-v4l2src-Check-for-obj-pool-NULL.patch b/0001-v4l2src-Check-for-obj-pool-NULL.patch new file mode 100644 index 0000000..f3c0081 --- /dev/null +++ b/0001-v4l2src-Check-for-obj-pool-NULL.patch @@ -0,0 +1,37 @@ +From 5f41f4683d50fce293d770ae35f3f9a0083744a6 Mon Sep 17 00:00:00 2001 +From: Debarshi Ray +Date: Tue, 6 Nov 2012 19:49:45 +0100 +Subject: [PATCH] v4l2src: Check for obj->pool == NULL + +Not sure how it could happen and can not reproduce it either, but it +did happen once during a VoIP call and the backtrace lays the blame +on obj->pool being NULL. + +https://bugzilla.gnome.org/show_bug.cgi?id=687793 +--- + sys/v4l2/gstv4l2src.c | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +diff --git a/sys/v4l2/gstv4l2src.c b/sys/v4l2/gstv4l2src.c +index 6197f78..58ff481 100644 +--- a/sys/v4l2/gstv4l2src.c ++++ b/sys/v4l2/gstv4l2src.c +@@ -763,11 +763,14 @@ gst_v4l2src_fill (GstPushSrc * src, GstBuffer * buf) + { + GstV4l2Src *v4l2src = GST_V4L2SRC (src); + GstV4l2Object *obj = v4l2src->v4l2object; +- GstFlowReturn ret; ++ GstFlowReturn ret = GST_FLOW_ERROR; + GstClock *clock; + GstClockTime abs_time, base_time, timestamp, duration; + GstClockTime delay; + ++ if (G_UNLIKELY (obj->pool == NULL)) ++ goto error; ++ + ret = + gst_v4l2_buffer_pool_process (GST_V4L2_BUFFER_POOL_CAST (obj->pool), buf); + +-- +1.7.12.1 + diff --git a/gstreamer1-plugins-good.spec b/gstreamer1-plugins-good.spec index 3f23ece..620331e 100644 --- a/gstreamer1-plugins-good.spec +++ b/gstreamer1-plugins-good.spec @@ -9,7 +9,7 @@ Name: gstreamer1-plugins-good Version: 1.0.2 -Release: 2%{?dist} +Release: 3%{?dist} Summary: GStreamer plugins with good code and licensing License: LGPLv2+ @@ -17,6 +17,8 @@ URL: http://gstreamer.freedesktop.org/ Source0: http://gstreamer.freedesktop.org/src/gst-plugins-good/gst-plugins-good-%{version}.tar.xz Patch0: 0001-vp8dec-Short-circuit-gst_vp8_dec_handle_frame-if-key.patch Patch1: 0002-vp8dec-Immediately-return-if-opening-the-decoder-fai.patch +Patch2: 0001-speexdec-Don-t-unmap-or-finish_frame-an-invalid-GstB.patch +Patch3: 0001-v4l2src-Check-for-obj-pool-NULL.patch BuildRequires: gstreamer1-devel >= %{version} BuildRequires: gstreamer1-plugins-base-devel >= %{version} @@ -87,6 +89,8 @@ to be installed. %setup -q -n gst-plugins-good-%{version} %patch0 -p1 %patch1 -p1 +%patch2 -p1 +%patch3 -p1 %build @@ -203,6 +207,9 @@ find $RPM_BUILD_ROOT -name '*.la' -exec rm -f {} ';' %changelog +* Wed Nov 7 2012 Debarshi Ray - 1.0.2-3 +- Fixes for GNOME #687464 and #687793 + * Fri Nov 2 2012 Debarshi Ray - 1.0.2-2 - Fixes for vp8dec including GNOME #687376 From 91f65ded5aa3ec6d93454a2815eeb64e65a2c0af Mon Sep 17 00:00:00 2001 From: Brian Pepple Date: Wed, 21 Nov 2012 11:29:17 -0500 Subject: [PATCH 5/5] Update to 1.0.3 Drop speexdec patch. Fixed upstream. Drop vp8 patches. Fixed upstream. --- .gitignore | 1 + ...nmap-or-finish_frame-an-invalid-GstB.patch | 61 ------------------- ...cuit-gst_vp8_dec_handle_frame-if-key.patch | 40 ------------ ...ly-return-if-opening-the-decoder-fai.patch | 26 -------- gstreamer1-plugins-good.spec | 15 +++-- sources | 2 +- 6 files changed, 9 insertions(+), 136 deletions(-) delete mode 100644 0001-speexdec-Don-t-unmap-or-finish_frame-an-invalid-GstB.patch delete mode 100644 0001-vp8dec-Short-circuit-gst_vp8_dec_handle_frame-if-key.patch delete mode 100644 0002-vp8dec-Immediately-return-if-opening-the-decoder-fai.patch diff --git a/.gitignore b/.gitignore index 0faf140..604c466 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,4 @@ /gst-plugins-good-1.0.0.tar.xz /gst-plugins-good-1.0.1.tar.xz /gst-plugins-good-1.0.2.tar.xz +/gst-plugins-good-1.0.3.tar.xz diff --git a/0001-speexdec-Don-t-unmap-or-finish_frame-an-invalid-GstB.patch b/0001-speexdec-Don-t-unmap-or-finish_frame-an-invalid-GstB.patch deleted file mode 100644 index ce0eb21..0000000 --- a/0001-speexdec-Don-t-unmap-or-finish_frame-an-invalid-GstB.patch +++ /dev/null @@ -1,61 +0,0 @@ -From 0bf17544e3c2a9277975659ce6e52d265d9b3e8a Mon Sep 17 00:00:00 2001 -From: Debarshi Ray -Date: Fri, 2 Nov 2012 16:39:28 +0100 -Subject: [PATCH] speexdec: Don't unmap or finish_frame an invalid GstBuffer - -https://bugzilla.gnome.org/show_bug.cgi?id=687464 ---- - ext/speex/gstspeexdec.c | 17 ++++++++++------- - 1 file changed, 10 insertions(+), 7 deletions(-) - -diff --git a/ext/speex/gstspeexdec.c b/ext/speex/gstspeexdec.c -index 36cc68b..cd78804 100644 ---- a/ext/speex/gstspeexdec.c -+++ b/ext/speex/gstspeexdec.c -@@ -392,6 +392,7 @@ gst_speex_dec_parse_data (GstSpeexDec * dec, GstBuffer * buf) - /* now decode each frame, catering for unknown number of them (e.g. rtp) */ - for (i = 0; i < fpp; i++) { - GstBuffer *outbuf; -+ gboolean corrupted = FALSE; - gint ret; - - GST_LOG_OBJECT (dec, "decoding frame %d/%d, %d bits remaining", i, fpp, -@@ -425,18 +426,15 @@ gst_speex_dec_parse_data (GstSpeexDec * dec, GstBuffer * buf) - } else { - GST_WARNING_OBJECT (dec, "Unexpected end of stream found"); - } -- gst_audio_decoder_finish_frame (GST_AUDIO_DECODER (dec), NULL, 1); -- gst_buffer_unref (outbuf); -+ corrupted = TRUE; - } else if (ret == -2) { - GST_WARNING_OBJECT (dec, "Decoding error: corrupted stream?"); -- gst_audio_decoder_finish_frame (GST_AUDIO_DECODER (dec), NULL, 1); -- gst_buffer_unref (outbuf); -+ corrupted = TRUE; - } - - if (bits && speex_bits_remaining (bits) < 0) { - GST_WARNING_OBJECT (dec, "Decoding overflow: corrupted stream?"); -- gst_audio_decoder_finish_frame (GST_AUDIO_DECODER (dec), NULL, 1); -- gst_buffer_unref (outbuf); -+ corrupted = TRUE; - } - if (dec->header->nb_channels == 2) - speex_decode_stereo_int ((spx_int16_t *) map.data, dec->frame_size, -@@ -444,7 +442,12 @@ gst_speex_dec_parse_data (GstSpeexDec * dec, GstBuffer * buf) - - gst_buffer_unmap (outbuf, &map); - -- res = gst_audio_decoder_finish_frame (GST_AUDIO_DECODER (dec), outbuf, 1); -+ if (!corrupted) { -+ res = gst_audio_decoder_finish_frame (GST_AUDIO_DECODER (dec), outbuf, 1); -+ } else { -+ res = gst_audio_decoder_finish_frame (GST_AUDIO_DECODER (dec), NULL, 1); -+ gst_buffer_unref (outbuf); -+ } - - if (res != GST_FLOW_OK) { - GST_DEBUG_OBJECT (dec, "flow: %s", gst_flow_get_name (res)); --- -1.7.12.1 - diff --git a/0001-vp8dec-Short-circuit-gst_vp8_dec_handle_frame-if-key.patch b/0001-vp8dec-Short-circuit-gst_vp8_dec_handle_frame-if-key.patch deleted file mode 100644 index 4718a0f..0000000 --- a/0001-vp8dec-Short-circuit-gst_vp8_dec_handle_frame-if-key.patch +++ /dev/null @@ -1,40 +0,0 @@ -From 3c216600f55351549573cf94be541fc6055db128 Mon Sep 17 00:00:00 2001 -From: Debarshi Ray -Date: Thu, 1 Nov 2012 22:02:39 +0100 -Subject: [PATCH 1/2] vp8dec: Short circuit gst_vp8_dec_handle_frame if - keyframe is missing - -https://bugzilla.gnome.org/show_bug.cgi?id=687376 ---- - ext/vpx/gstvp8dec.c | 7 +++++-- - 1 file changed, 5 insertions(+), 2 deletions(-) - -diff --git a/ext/vpx/gstvp8dec.c b/ext/vpx/gstvp8dec.c -index 9ec1771..7dcd75b 100644 ---- a/ext/vpx/gstvp8dec.c -+++ b/ext/vpx/gstvp8dec.c -@@ -415,7 +415,7 @@ open_codec (GstVP8Dec * dec, GstVideoCodecFrame * frame) - if (status != VPX_CODEC_OK || !stream_info.is_kf) { - GST_WARNING_OBJECT (dec, "No keyframe, skipping"); - gst_video_decoder_finish_frame (GST_VIDEO_DECODER (dec), frame); -- return GST_FLOW_OK; -+ return GST_FLOW_CUSTOM_SUCCESS_1; - } - - g_assert (dec->output_state == NULL); -@@ -483,8 +483,11 @@ gst_vp8_dec_handle_frame (GstVideoDecoder * decoder, GstVideoCodecFrame * frame) - - dec = GST_VP8_DEC (decoder); - -- if (!dec->decoder_inited) -+ if (!dec->decoder_inited) { - ret = open_codec (dec, frame); -+ if (ret == GST_FLOW_CUSTOM_SUCCESS_1) -+ return GST_FLOW_OK; -+ } - - deadline = gst_video_decoder_get_max_decode_time (decoder, frame); - if (deadline < 0) { --- -1.7.12.1 - diff --git a/0002-vp8dec-Immediately-return-if-opening-the-decoder-fai.patch b/0002-vp8dec-Immediately-return-if-opening-the-decoder-fai.patch deleted file mode 100644 index dd116f1..0000000 --- a/0002-vp8dec-Immediately-return-if-opening-the-decoder-fai.patch +++ /dev/null @@ -1,26 +0,0 @@ -From f0640f205cca974ccbe0550e76ab37f16b7c8821 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= -Date: Fri, 2 Nov 2012 09:34:25 +0100 -Subject: [PATCH 2/2] vp8dec: Immediately return if opening the decoder failed - -Instead of ignoring any errors. ---- - ext/vpx/gstvp8dec.c | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/ext/vpx/gstvp8dec.c b/ext/vpx/gstvp8dec.c -index 7dcd75b..b5b4aa3 100644 ---- a/ext/vpx/gstvp8dec.c -+++ b/ext/vpx/gstvp8dec.c -@@ -487,6 +487,8 @@ gst_vp8_dec_handle_frame (GstVideoDecoder * decoder, GstVideoCodecFrame * frame) - ret = open_codec (dec, frame); - if (ret == GST_FLOW_CUSTOM_SUCCESS_1) - return GST_FLOW_OK; -+ else if (ret != GST_FLOW_OK) -+ return ret; - } - - deadline = gst_video_decoder_get_max_decode_time (decoder, frame); --- -1.7.12.1 - diff --git a/gstreamer1-plugins-good.spec b/gstreamer1-plugins-good.spec index 620331e..90a9bf3 100644 --- a/gstreamer1-plugins-good.spec +++ b/gstreamer1-plugins-good.spec @@ -8,16 +8,13 @@ %endif Name: gstreamer1-plugins-good -Version: 1.0.2 -Release: 3%{?dist} +Version: 1.0.3 +Release: 1%{?dist} Summary: GStreamer plugins with good code and licensing License: LGPLv2+ URL: http://gstreamer.freedesktop.org/ Source0: http://gstreamer.freedesktop.org/src/gst-plugins-good/gst-plugins-good-%{version}.tar.xz -Patch0: 0001-vp8dec-Short-circuit-gst_vp8_dec_handle_frame-if-key.patch -Patch1: 0002-vp8dec-Immediately-return-if-opening-the-decoder-fai.patch -Patch2: 0001-speexdec-Don-t-unmap-or-finish_frame-an-invalid-GstB.patch Patch3: 0001-v4l2src-Check-for-obj-pool-NULL.patch BuildRequires: gstreamer1-devel >= %{version} @@ -87,9 +84,6 @@ to be installed. %prep %setup -q -n gst-plugins-good-%{version} -%patch0 -p1 -%patch1 -p1 -%patch2 -p1 %patch3 -p1 @@ -207,6 +201,11 @@ find $RPM_BUILD_ROOT -name '*.la' -exec rm -f {} ';' %changelog +* Wed Nov 21 2012 Brian Pepple - 1.0.3-1 +- Update to 1.0.3 +- Drop speexdec patch. Fixed upstream. +- Drop vp8 patches. Fixed upstream. + * Wed Nov 7 2012 Debarshi Ray - 1.0.2-3 - Fixes for GNOME #687464 and #687793 diff --git a/sources b/sources index dca169f..b45a5f1 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -13e487127d80fe20c868b3bbb2a17d9e gst-plugins-good-1.0.2.tar.xz +5cfc3f18dede15d60f0af8666f68193e gst-plugins-good-1.0.3.tar.xz