vorbisdec: only finish header packet frame if received in-stream
authorMark Nauwelaerts <mark.nauwelaerts@collabora.co.uk>
Tue, 18 Oct 2011 19:40:54 +0000 (21:40 +0200)
committerMark Nauwelaerts <mark.nauwelaerts@collabora.co.uk>
Wed, 19 Oct 2011 14:44:44 +0000 (16:44 +0200)
... rather than scaring audiodecoder with a frame extracted from caps.

Fixes #662108 (partially).

ext/vorbis/gstvorbisdec.c

index 6e6601a29c5386fb1ff33280f79eae61f35733c7..9b0b50bd16a0fc51b2640ba9c622f2784b35ef55 100644 (file)
@@ -458,9 +458,6 @@ vorbis_handle_header_packet (GstVorbisDec * vd, ogg_packet * packet)
       break;
   }
 
-  /* consumer header packet/frame */
-  gst_audio_decoder_finish_frame (GST_AUDIO_DECODER (vd), NULL, 1);
-
   return res;
 
   /* ERRORS */
@@ -693,6 +690,8 @@ vorbis_dec_handle_frame (GstAudioDecoder * dec, GstBuffer * buffer)
       goto done;
     }
     result = vorbis_handle_header_packet (vd, packet);
+    /* consumer header packet/frame */
+    gst_audio_decoder_finish_frame (GST_AUDIO_DECODER (vd), NULL, 1);
   } else {
     GstClockTime timestamp, duration;