[gst-cvs] gst-plugins-good: [MOVED FROM BAD 40/57] gst/flv/gstflvparse.c: If the caps change during playback and negotiation fails error out instead of trying to continue .

Sebastian Dröge slomo at kemper.freedesktop.org
Tue May 12 12:58:00 PDT 2009


Module: gst-plugins-good
Branch: master
Commit: 4aa480725c861f7e5c5b6b5b5606db8642ea5b48
URL:    http://cgit.freedesktop.org/gstreamer/gst-plugins-good/commit/?id=4aa480725c861f7e5c5b6b5b5606db8642ea5b48

Author: Sebastian Dröge <slomo at circular-chaos.org>
Date:   Mon Oct 27 09:35:34 2008 +0000

[MOVED FROM BAD 40/57] gst/flv/gstflvparse.c: If the caps change during playback and negotiation fails error out instead of trying to continue.

Original commit message from CVS:
* gst/flv/gstflvparse.c: (gst_flv_parse_tag_audio),
(gst_flv_parse_tag_video):
If the caps change during playback and negotiation fails error out
instead of trying to continue.

---

 gst/flv/gstflvparse.c |   11 +++++++++--
 1 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/gst/flv/gstflvparse.c b/gst/flv/gstflvparse.c
index d9cdb23..e7c4f14 100644
--- a/gst/flv/gstflvparse.c
+++ b/gst/flv/gstflvparse.c
@@ -606,7 +606,11 @@ gst_flv_parse_tag_audio (GstFLVDemux * demux, const guint8 * data,
     GST_DEBUG_OBJECT (demux, "audio settings have changed, changing caps");
 
     /* Negotiate caps */
-    gst_flv_parse_audio_negotiate (demux, codec_tag, rate, channels, width);
+    if (!gst_flv_parse_audio_negotiate (demux, codec_tag, rate, channels,
+            width)) {
+      ret = GST_FLOW_ERROR;
+      goto beach;
+    }
   }
 
   /* Push taglist if present */
@@ -907,7 +911,10 @@ gst_flv_parse_tag_video (GstFLVDemux * demux, const guint8 * data,
 
     GST_DEBUG_OBJECT (demux, "video settings have changed, changing caps");
 
-    gst_flv_parse_video_negotiate (demux, codec_tag);
+    if (!gst_flv_parse_video_negotiate (demux, codec_tag)) {
+      ret = GST_FLOW_ERROR;
+      goto beach;
+    }
 
     /* When we ve set pixel-aspect-ratio we use that boolean to detect a 
      * metadata tag that would come later and trigger a caps change */





More information about the Gstreamer-commits mailing list