[mmfmwk-8034] enhance handling fuzzy aac clips

- Add error handle for ACODEC_ERR_UNKNOWN
return from dsp wrapper
- Add protection for multi createDecoder() called
as createDecoder() is in set_format() which will
be invoked when detecting parameter changed.

Signed-off-by: Lyon Wang <lyon.wang@nxp.com>
diff --git a/plugins/beepdec/beepdec.c b/plugins/beepdec/beepdec.c
index 4223ee0..e52b76c 100755
--- a/plugins/beepdec/beepdec.c
+++ b/plugins/beepdec/beepdec.c
@@ -460,7 +460,8 @@
             } else {
               goto dsp_fail;
             }
-            beepdec->handle = IDecoder->createDecoderplus(&ops, type);
+            if (beepdec->handle == NULL)
+              beepdec->handle = IDecoder->createDecoderplus(&ops, type);
             if (beepdec->handle == NULL) {
               /* create fail, dsp not support */
               GST_INFO (" dsp create decoder fail ");
@@ -499,7 +500,8 @@
         ops.ReAlloc = beepdec_core_mem_realloc;
         ops.Free = beepdec_core_mem_free;
 
-        beepdec->handle = IDecoder->createDecoder (&ops);
+        if(beepdec->handle == NULL)
+          beepdec->handle = IDecoder->createDecoder (&ops);
 
         if(beepdec->handle == NULL)
             break;
@@ -864,7 +866,7 @@
         GST_LOG_OBJECT (beepdec,"decode RET=%x input size=%d,used size=%d,output_size=%d"
             ,core_ret,inbuf_size,offset,out_size);
 
-        if (ACODEC_ERROR_STREAM == core_ret) {
+        if ((ACODEC_ERROR_STREAM == core_ret) || (ACODEC_ERR_UNKNOWN == core_ret)){
             GST_WARNING("decode END error = %x\n", core_ret);
             IDecoder->resetDecoder(handle);
             //send null frame to delete the timestamp