codec2: Fix timestampDev issues for Mpeg2Dec
If last_frame come with EOS then we need to cloneandSend it.
Test: VtsHidlC2V1_0TargetVideoDecTest -I software -P /sdcard/res/ -C c2.android.mpeg2.decoder
Bug: 123267886
Change-Id: Iec3d5d8befe7d9e323d8dce4ab194098d47e43d6
diff --git a/media/codec2/components/mpeg2/C2SoftMpeg2Dec.h b/media/codec2/components/mpeg2/C2SoftMpeg2Dec.h
index 9999872..65d3b87 100644
--- a/media/codec2/components/mpeg2/C2SoftMpeg2Dec.h
+++ b/media/codec2/components/mpeg2/C2SoftMpeg2Dec.h
@@ -17,6 +17,7 @@
#ifndef ANDROID_C2_SOFT_MPEG2_DEC_H_
#define ANDROID_C2_SOFT_MPEG2_DEC_H_
+#include <atomic>
#include <SimpleC2Component.h>
#include <media/stagefright/foundation/ColorUtils.h>
@@ -161,6 +162,7 @@
uint32_t mStride;
bool mSignalledOutputEos;
bool mSignalledError;
+ std::atomic_uint64_t mOutIndex;
// Color aspects. These are ISO values and are meant to detect changes in aspects to avoid
// converting them to C2 values for each frame