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

Commit 3e518fd5 authored by Marco Nelissen's avatar Marco Nelissen
Browse files

Notify current video size if available

b/11248101

Change-Id: I0fa3b5592efcf400c86692002267da6825e331ad
parent 9cae2170
Loading
Loading
Loading
Loading
+10 −1
Original line number Diff line number Diff line
@@ -201,7 +201,16 @@ void NuPlayer::HTTPLiveSource::onSessionNotify(const sp<AMessage> &msg) {
    switch (what) {
        case LiveSession::kWhatPrepared:
        {
            // notify the current size here if we have it, otherwise report an initial size of (0,0)
            sp<AMessage> format = getFormat(false /* audio */);
            int32_t width;
            int32_t height;
            if (format != NULL &&
                    format->findInt32("width", &width) && format->findInt32("height", &height)) {
                notifyVideoSizeChanged(width, height);
            } else {
                notifyVideoSizeChanged(0, 0);
            }

            uint32_t flags = FLAG_CAN_PAUSE;
            if (mLiveSession->isSeekable()) {