Skip to content

Commit 0d0d275

Browse files
Jiajia Congrazorloves
authored andcommitted
codec2: a workaround to solve backward compatibility issue
As framework change depends on HAL change . In those platforms only have framework change, the empty work couldn't be handled properly. Then the result C2_NOT_FOUND will be returned and framework will report a fatal error to client. We have to avoid such dependency issue CRs-Fixed: 2916108 Change-Id: I5270f5e2bd1922b84fb34364bb4cb8522ff389ec
1 parent 372a94d commit 0d0d275

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

media/codec2/sfplugin/CCodecBufferChannel.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2283,6 +2283,12 @@ bool CCodecBufferChannel::handleWork(
22832283
ALOGV("[%s] empty work returned; omitted.", mName);
22842284
return false; // omitted
22852285
} else if (work->result == C2_NOT_FOUND) {
2286+
if (work->input.flags & C2FrameData::FLAG_DROP_FRAME) {
2287+
// NOTE: This is to solve backward compatibility issue of queueDummyWork. If no HAL fix,
2288+
// we will receive C2_NOT_FOUND here and then issue fatal error to MediaCodec
2289+
ALOGV("[%s] empty work returned; omitted.", mName);
2290+
return false; // omitted
2291+
}
22862292
ALOGD("[%s] flushed work; ignored.", mName);
22872293
} else {
22882294
// C2_OK and C2_NOT_FOUND are the only results that we accept for processing

0 commit comments

Comments
 (0)