Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 480a8368 authored by shuanglong.wang's avatar shuanglong.wang Committed by Sungtak Lee
Browse files

CCodec: Push blank buffer at the end of protected content

Push blank buffer at the end of playback if secure decoder was used or
the content was specified as protected.

Test: manual
Bug: 268122557
Bug: 231689951
Change-Id: I71e87611b022a4c5216b27d9ebf181ff46b5a0c6
parent ce238dd4
Loading
Loading
Loading
Loading
+10 −0
Original line number Original line Diff line number Diff line
@@ -877,6 +877,16 @@ void CCodec::configure(const sp<AMessage> &msg) {
                    if (msg->findInt32(KEY_PUSH_BLANK_BUFFERS_ON_STOP, &pushBlankBuffersOnStop)) {
                    if (msg->findInt32(KEY_PUSH_BLANK_BUFFERS_ON_STOP, &pushBlankBuffersOnStop)) {
                        config->mPushBlankBuffersOnStop = pushBlankBuffersOnStop == 1;
                        config->mPushBlankBuffersOnStop = pushBlankBuffersOnStop == 1;
                    }
                    }
                    // secure compoment or protected content default with
                    // "push-blank-buffers-on-shutdown" flag
                    if (!config->mPushBlankBuffersOnStop) {
                        int32_t usageProtected;
                        if (comp->getName().find(".secure") != std::string::npos) {
                            config->mPushBlankBuffersOnStop = true;
                        } else if (msg->findInt32("protected", &usageProtected) && usageProtected) {
                            config->mPushBlankBuffersOnStop = true;
                        }
                    }
                }
                }
            }
            }
            setSurface(surface);
            setSurface(surface);