summaryrefslogtreecommitdiffstats
path: root/media/libmediaplayerservice/nuplayer
diff options
context:
space:
mode:
authorThe Android Open Source Project <initial-contribution@android.com>2013-12-05 12:38:14 -0800
committerThe Android Open Source Project <initial-contribution@android.com>2013-12-05 12:38:14 -0800
commite2d617f5ba7fb90f27b03e2593666b2c927e4dc9 (patch)
tree187992f0c2d4bc565ca24b34aa0ee78e359a3f68 /media/libmediaplayerservice/nuplayer
parent92630351d265a61faae2dfe006a8bb330283aa7b (diff)
parent2381f06f374ee0cb8bca0edf5388394432b00e6d (diff)
downloadframeworks_av-e2d617f5ba7fb90f27b03e2593666b2c927e4dc9.zip
frameworks_av-e2d617f5ba7fb90f27b03e2593666b2c927e4dc9.tar.gz
frameworks_av-e2d617f5ba7fb90f27b03e2593666b2c927e4dc9.tar.bz2
Merge commit '2381f06f374ee0cb8bca0edf5388394432b00e6d' into HEAD
Diffstat (limited to 'media/libmediaplayerservice/nuplayer')
-rw-r--r--media/libmediaplayerservice/nuplayer/HTTPLiveSource.cpp11
1 files changed, 10 insertions, 1 deletions
diff --git a/media/libmediaplayerservice/nuplayer/HTTPLiveSource.cpp b/media/libmediaplayerservice/nuplayer/HTTPLiveSource.cpp
index d8b35d7..f1782cc 100644
--- a/media/libmediaplayerservice/nuplayer/HTTPLiveSource.cpp
+++ b/media/libmediaplayerservice/nuplayer/HTTPLiveSource.cpp
@@ -201,7 +201,16 @@ void NuPlayer::HTTPLiveSource::onSessionNotify(const sp<AMessage> &msg) {
switch (what) {
case LiveSession::kWhatPrepared:
{
- notifyVideoSizeChanged(0, 0);
+ // 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()) {