Loading media/libmediaplayerservice/nuplayer/NuPlayer.cpp +2 −1 Original line number Diff line number Diff line Loading @@ -1822,7 +1822,8 @@ void NuPlayer::updateVideoSize( // Take into account sample aspect ratio if necessary: int32_t sarWidth, sarHeight; if (inputFormat->findInt32("sar-width", &sarWidth) && inputFormat->findInt32("sar-height", &sarHeight)) { && inputFormat->findInt32("sar-height", &sarHeight) && sarWidth > 0 && sarHeight > 0) { ALOGV("Sample aspect ratio %d : %d", sarWidth, sarHeight); displayWidth = (displayWidth * sarWidth) / sarHeight; Loading media/libstagefright/avc_utils.cpp +2 −2 Original line number Diff line number Diff line Loading @@ -420,8 +420,8 @@ sp<MetaData> MakeAVCCodecSpecificData(const sp<ABuffer> &accessUnit) { meta->setInt32(kKeyWidth, width); meta->setInt32(kKeyHeight, height); if (sarWidth > 1 || sarHeight > 1) { // We treat 0:0 (unspecified) as 1:1. if ((sarWidth > 0 && sarHeight > 0) && (sarWidth != 1 || sarHeight != 1)) { // We treat *:0 and 0:* (unspecified) as 1:1. meta->setInt32(kKeySARWidth, sarWidth); meta->setInt32(kKeySARHeight, sarHeight); Loading Loading
media/libmediaplayerservice/nuplayer/NuPlayer.cpp +2 −1 Original line number Diff line number Diff line Loading @@ -1822,7 +1822,8 @@ void NuPlayer::updateVideoSize( // Take into account sample aspect ratio if necessary: int32_t sarWidth, sarHeight; if (inputFormat->findInt32("sar-width", &sarWidth) && inputFormat->findInt32("sar-height", &sarHeight)) { && inputFormat->findInt32("sar-height", &sarHeight) && sarWidth > 0 && sarHeight > 0) { ALOGV("Sample aspect ratio %d : %d", sarWidth, sarHeight); displayWidth = (displayWidth * sarWidth) / sarHeight; Loading
media/libstagefright/avc_utils.cpp +2 −2 Original line number Diff line number Diff line Loading @@ -420,8 +420,8 @@ sp<MetaData> MakeAVCCodecSpecificData(const sp<ABuffer> &accessUnit) { meta->setInt32(kKeyWidth, width); meta->setInt32(kKeyHeight, height); if (sarWidth > 1 || sarHeight > 1) { // We treat 0:0 (unspecified) as 1:1. if ((sarWidth > 0 && sarHeight > 0) && (sarWidth != 1 || sarHeight != 1)) { // We treat *:0 and 0:* (unspecified) as 1:1. meta->setInt32(kKeySARWidth, sarWidth); meta->setInt32(kKeySARHeight, sarHeight); Loading