audiodecoder: should post DECODE errors and not ENCODE
authorThiago Santos <thiago.sousa.santos@collabora.com>
Tue, 14 Oct 2014 01:24:31 +0000 (22:24 -0300)
committerThiago Santos <thiagoss@osg.samsung.com>
Tue, 14 Oct 2014 01:26:29 +0000 (22:26 -0300)
Fix error code for audio decoder

gst-libs/gst/audio/gstaudiodecoder.c

index 4634249..84b6242 100644 (file)
@@ -1172,7 +1172,7 @@ gst_audio_decoder_finish_frame (GstAudioDecoder * dec, GstBuffer * buf,
   /* frame and ts book-keeping */
   if (G_UNLIKELY (frames < 0)) {
     if (G_UNLIKELY (-frames - 1 > priv->frames.length)) {
-      GST_ELEMENT_WARNING (dec, STREAM, ENCODE,
+      GST_ELEMENT_WARNING (dec, STREAM, DECODE,
           ("received more decoded frames %d than provided %d", frames,
               priv->frames.length), (NULL));
       frames = 0;
@@ -1181,7 +1181,7 @@ gst_audio_decoder_finish_frame (GstAudioDecoder * dec, GstBuffer * buf,
     }
   } else if (G_UNLIKELY (frames > priv->frames.length)) {
     if (G_LIKELY (!priv->force)) {
-      GST_ELEMENT_WARNING (dec, STREAM, ENCODE,
+      GST_ELEMENT_WARNING (dec, STREAM, DECODE,
           ("received more decoded frames %d than provided %d", frames,
               priv->frames.length), (NULL));
     }
@@ -1287,7 +1287,7 @@ exit:
   /* ERRORS */
 wrong_buffer:
   {
-    GST_ELEMENT_ERROR (dec, STREAM, ENCODE, (NULL),
+    GST_ELEMENT_ERROR (dec, STREAM, DECODE, (NULL),
         ("buffer size %" G_GSIZE_FORMAT " not a multiple of %d", size,
             ctx->info.bpf));
     gst_buffer_unref (buf);