diff options
author | Andreas Huber <andih@google.com> | 2011-09-26 10:53:29 -0700 |
---|---|---|
committer | Andreas Huber <andih@google.com> | 2011-09-26 10:53:29 -0700 |
commit | dc9bacd838442a524585887e6ea6696836be2eda (patch) | |
tree | 230135b6bc20bff2be5a8292e91c0fac86201039 /media/libmediaplayerservice/nuplayer | |
parent | ece731de0c0af30917316d55313f25c56f91960d (diff) | |
download | frameworks_av-dc9bacd838442a524585887e6ea6696836be2eda.zip frameworks_av-dc9bacd838442a524585887e6ea6696836be2eda.tar.gz frameworks_av-dc9bacd838442a524585887e6ea6696836be2eda.tar.bz2 |
Propagate error signalled by the source all the way to the output EOS notification.
Change-Id: I30e959a6d669f09745c59fbdebee08f869511cf7
related-to-bug: 5372901
Diffstat (limited to 'media/libmediaplayerservice/nuplayer')
-rw-r--r-- | media/libmediaplayerservice/nuplayer/HTTPLiveSource.cpp | 6 | ||||
-rw-r--r-- | media/libmediaplayerservice/nuplayer/NuPlayer.cpp | 15 |
2 files changed, 18 insertions, 3 deletions
diff --git a/media/libmediaplayerservice/nuplayer/HTTPLiveSource.cpp b/media/libmediaplayerservice/nuplayer/HTTPLiveSource.cpp index 605d056..fb14204 100644 --- a/media/libmediaplayerservice/nuplayer/HTTPLiveSource.cpp +++ b/media/libmediaplayerservice/nuplayer/HTTPLiveSource.cpp @@ -110,7 +110,11 @@ bool NuPlayer::HTTPLiveSource::feedMoreTSData() { if (n == -EWOULDBLOCK) { break; } else if (n < 0) { - LOGI("input data EOS reached."); + if (n != ERROR_END_OF_STREAM) { + LOGI("input data EOS reached, error %d", n); + } else { + LOGI("input data EOS reached."); + } mTSParser->signalEOS(n); mEOS = true; break; diff --git a/media/libmediaplayerservice/nuplayer/NuPlayer.cpp b/media/libmediaplayerservice/nuplayer/NuPlayer.cpp index 7218faf..7bfd358 100644 --- a/media/libmediaplayerservice/nuplayer/NuPlayer.cpp +++ b/media/libmediaplayerservice/nuplayer/NuPlayer.cpp @@ -272,7 +272,18 @@ void NuPlayer::onMessageReceived(const sp<AMessage> &msg) { } } } else if (what == ACodec::kWhatEOS) { - mRenderer->queueEOS(audio, ERROR_END_OF_STREAM); + int32_t err; + CHECK(codecRequest->findInt32("err", &err)); + + if (err == ERROR_END_OF_STREAM) { + LOGV("got %s decoder EOS", audio ? "audio" : "video"); + } else { + LOGV("got %s decoder EOS w/ error %d", + audio ? "audio" : "video", + err); + } + + mRenderer->queueEOS(audio, err); } else if (what == ACodec::kWhatFlushCompleted) { bool needShutdown; @@ -397,7 +408,7 @@ void NuPlayer::onMessageReceived(const sp<AMessage> &msg) { if (finalResult == ERROR_END_OF_STREAM) { LOGV("reached %s EOS", audio ? "audio" : "video"); } else { - LOGE("%s track encountered an error (0x%08x)", + LOGE("%s track encountered an error (%d)", audio ? "audio" : "video", finalResult); notifyListener( |