[prev in list] [next in list] [prev in thread] [next in thread] 

List:       gstreamer-cvs
Subject:    [gst-cvs] gst-plugins-base: oggdemux: fix wrong flowreturn handling
From:       wtay () kemper ! freedesktop ! org (Wim Taymans)
Date:       2010-10-29 11:13:15
Message-ID: 20101029111315.C9DAD10056 () kemper ! freedesktop ! org
[Download RAW message or body]

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


Author: Wim Taymans <wim.taymans@collabora.co.uk>
Date:   Fri Oct 29 11:48:18 2010 +0100

oggdemux: fix wrong flowreturn handling

Oggdemux will currently try to pad alloc a buffer from the peer when it is
reading the header files. This is a relic from the time where we had an internal
parser and needs to be removed at some point in time.

The problem is that when there is no peer pad yet (which is normal when
collecting headers) we should still continue to parse all the packets of a
page instead of erroring out on NOT_LINKED.

Fixes #632167

---

 ext/ogg/gstoggdemux.c |   14 +++-----------
 1 files changed, 3 insertions(+), 11 deletions(-)

diff --git a/ext/ogg/gstoggdemux.c b/ext/ogg/gstoggdemux.c
index ad7a252..6f83176 100644
--- a/ext/ogg/gstoggdemux.c
+++ b/ext/ogg/gstoggdemux.c
@@ -993,8 +993,10 @@ gst_ogg_pad_stream_out (GstOggPad * pad, gint npackets)
       case 1:
         GST_LOG_OBJECT (ogg, "packetout gave packet of size %ld", packet.bytes);
         result = gst_ogg_pad_submit_packet (pad, &packet);
+        /* not linked is not a problem, it's possible that we are still
+         * collecting headers and that we don't have exposed the pads yet */
         if (result == GST_FLOW_NOT_LINKED)
-          goto not_linked;
+          break;
         else if (result <= GST_FLOW_UNEXPECTED)
           goto could_not_submit;
         break;
@@ -1013,16 +1015,6 @@ gst_ogg_pad_stream_out (GstOggPad * pad, gint npackets)
   return result;
 
   /* ERRORS */
-not_linked:
-  {
-    GST_WARNING_OBJECT (ogg,
-        "could not submit packet for stream %08lx, error: %d",
-        pad->map.serialno, result);
-    /* Not resetting the pad here because it might be linked
-     * later and should work without problems then.
-     */
-    return result;
-  }
 could_not_submit:
   {
     GST_WARNING_OBJECT (ogg,


------------------------------------------------------------------------------
Nokia and AT&T present the 2010 Calling All Innovators-North America contest
Create new apps & games for the Nokia N8 for consumers in  U.S. and Canada
$10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing
Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store 
http://p.sf.net/sfu/nokia-dev2dev
_______________________________________________
gstreamer-cvs mailing list
gstreamer-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gstreamer-cvs


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic