From 0f694a12f92a01f95807242320bd65e88c699708 Mon Sep 17 00:00:00 2001 From: Ronghua Wu Date: Thu, 2 Oct 2014 11:21:08 -0700 Subject: stagefright: fix fake-stride handling for H263 SW decoder - Use outputBufferWidth/Height to init H263 decoder. - Handle stride change when using fake stride. Bug: 17773094 Bug: 17326758 Change-Id: I66ce7b9c650383456923d75417c590e3a8a814e7 --- media/libstagefright/codecs/m4v_h263/dec/SoftMPEG4.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'media/libstagefright/codecs/m4v_h263/dec/SoftMPEG4.cpp') diff --git a/media/libstagefright/codecs/m4v_h263/dec/SoftMPEG4.cpp b/media/libstagefright/codecs/m4v_h263/dec/SoftMPEG4.cpp index d98fa80..1f4b6fd 100644 --- a/media/libstagefright/codecs/m4v_h263/dec/SoftMPEG4.cpp +++ b/media/libstagefright/codecs/m4v_h263/dec/SoftMPEG4.cpp @@ -156,7 +156,8 @@ void SoftMPEG4::onQueueFilled(OMX_U32 /* portIndex */) { (mMode == MODE_MPEG4) ? MPEG4_MODE : H263_MODE; Bool success = PVInitVideoDecoder( - mHandle, vol_data, &vol_size, 1, mWidth, mHeight, mode); + mHandle, vol_data, &vol_size, 1, + outputBufferWidth(), outputBufferHeight(), mode); if (!success) { ALOGW("PVInitVideoDecoder failed. Unsupported content?"); @@ -321,7 +322,7 @@ bool SoftMPEG4::handlePortSettingsChange() { vol_data[0] = NULL; if (!PVInitVideoDecoder( - mHandle, vol_data, &vol_size, 1, mWidth, mHeight, + mHandle, vol_data, &vol_size, 1, outputBufferWidth(), outputBufferHeight(), H263_MODE)) { notify(OMX_EventError, OMX_ErrorUndefined, 0, NULL); mSignalledError = true; -- cgit v1.1