codec2: fix C2SoftAacDec and C2SoftXaacDec set work processed for CSD frame

Flag was not initialized so sometimes it was triggering EOS

Test: MtsHidlC2V1_0TargetAudioDecTest -I software -C c2.android.aac.decoder -P /sdcard/res/
Test: run cts -m CtsMediaTestCases --test android.media.cts.DecoderTest#testDecodeAacLcM4a
Test: run cts -m CtsMediaTestCases --test android.media.cts.DecoderTest#testDecodeAacEldM4a
Test: run cts -m CtsMediaTestCases --test android.media.cts.DecoderTestXheAac#testDecodeUsacSamplingRatesM4a
Bug: 110549953

Change-Id: I72de94492c1675ae3907b58aa7d1d007bb47beac
diff --git a/media/codecs/aac/C2SoftAacDec.cpp b/media/codecs/aac/C2SoftAacDec.cpp
index c7b1191..d13fdd7 100644
--- a/media/codecs/aac/C2SoftAacDec.cpp
+++ b/media/codecs/aac/C2SoftAacDec.cpp
@@ -570,10 +570,10 @@
             // TODO: error
             return;
         }
-
+        work->worklets.front()->output.flags = work->input.flags;
         work->worklets.front()->output.ordinal = work->input.ordinal;
         work->worklets.front()->output.buffers.clear();
-
+        work->workletsProcessed = 1u;
         return;
     }
 
diff --git a/media/codecs/xaac/C2SoftXaacDec.cpp b/media/codecs/xaac/C2SoftXaacDec.cpp
index d77dd9e..5831f67 100644
--- a/media/codecs/xaac/C2SoftXaacDec.cpp
+++ b/media/codecs/xaac/C2SoftXaacDec.cpp
@@ -432,6 +432,7 @@
             work->result = C2_CORRUPTED;
             return;
         }
+        work->worklets.front()->output.flags = work->input.flags;
         work->worklets.front()->output.ordinal = work->input.ordinal;
         work->worklets.front()->output.buffers.clear();
         work->workletsProcessed = 1u;