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

Commit a0a61d9f authored by Emilio López's avatar Emilio López
Browse files

libstagefright: Don't fail when we don't get height/width from decoder

This fixes video for zeppelin, which was failing due to this
F/QComHardwareRenderer(  122): hardware/msm7k/libstagefrighthw/QComHardwareRenderer.cpp:78 mDecodedHeight > 0

Many thanks to Ricardo Cerqueira (arcee) for fixing this one

Change-Id: I17dac8bfbe7af0f319a00e3a4a70563b59749811
parent 17b7a813
Loading
Loading
Loading
Loading
+9 −2
Original line number Diff line number Diff line
@@ -3802,8 +3802,15 @@ void OMXCodec::initOutputFormat(const sp<MetaData> &inputFormat) {
                else {
                    LOGV("video_def->nStride = %d, video_def->nSliceHeight = %d", video_def->nStride,
                            video_def->nSliceHeight );
                    if (video_def->nStride && video_def->nSliceHeight) {
                        /* Make sure we actually got the values from the decoder */
                        mOutputFormat->setInt32(kKeyWidth, video_def->nStride);
                        mOutputFormat->setInt32(kKeyHeight, video_def->nSliceHeight);
                    } else {
                        /* We didn't. Use the old behavior */
                        mOutputFormat->setInt32(kKeyWidth, video_def->nFrameWidth);
                        mOutputFormat->setInt32(kKeyHeight, video_def->nFrameHeight);
                    }
                }
#else
                //Some hardware expects the old behavior