Merge "Fix seek error in loop mode." into main
diff --git a/media/codec2/components/mpeg4_h263/C2SoftMpeg4Dec.cpp b/media/codec2/components/mpeg4_h263/C2SoftMpeg4Dec.cpp
index 2137964..fd9488b 100644
--- a/media/codec2/components/mpeg4_h263/C2SoftMpeg4Dec.cpp
+++ b/media/codec2/components/mpeg4_h263/C2SoftMpeg4Dec.cpp
@@ -469,11 +469,12 @@
mInitialized = false;
}
+ bool codecConfig = (work->input.flags & C2FrameData::FLAG_CODEC_CONFIG) != 0;
+
if (!mInitialized) {
uint8_t *vol_data[1]{};
int32_t vol_size = 0;
- bool codecConfig = (work->input.flags & C2FrameData::FLAG_CODEC_CONFIG) != 0;
if (codecConfig || volHeader) {
vol_data[0] = bitstream;
vol_size = inSize;
@@ -512,10 +513,11 @@
return;
}
}
- if (codecConfig) {
- fillEmptyWork(work);
- return;
- }
+ }
+
+ if (codecConfig) {
+ fillEmptyWork(work);
+ return;
}
size_t inPos = 0;