diff options
author | Andreas Huber <andih@google.com> | 2011-08-31 16:29:05 -0700 |
---|---|---|
committer | Andreas Huber <andih@google.com> | 2011-08-31 16:29:05 -0700 |
commit | 06528d7f18ad01377357d337eaa3e875a242bd2d (patch) | |
tree | c08f45ba206b07b864f7a153f65fc739ae51fe1c /media/libmediaplayerservice/nuplayer | |
parent | 18ac5407da14dad9731f40ffc9a56bee73830019 (diff) | |
download | frameworks_av-06528d7f18ad01377357d337eaa3e875a242bd2d.zip frameworks_av-06528d7f18ad01377357d337eaa3e875a242bd2d.tar.gz frameworks_av-06528d7f18ad01377357d337eaa3e875a242bd2d.tar.bz2 |
I have one HLS stream that switches stream PIDs from one bandwidth to the next
this change intends to support its very limited case and signals an error in
all other cases of unexpected PID changes that we cannot recover from.
Change-Id: Icbfdf9fe7461969e2a8781ed416f54d891dd789a
Diffstat (limited to 'media/libmediaplayerservice/nuplayer')
-rw-r--r-- | media/libmediaplayerservice/nuplayer/HTTPLiveSource.cpp | 9 | ||||
-rw-r--r-- | media/libmediaplayerservice/nuplayer/StreamingSource.cpp | 10 |
2 files changed, 17 insertions, 2 deletions
diff --git a/media/libmediaplayerservice/nuplayer/HTTPLiveSource.cpp b/media/libmediaplayerservice/nuplayer/HTTPLiveSource.cpp index 0251baf..605d056 100644 --- a/media/libmediaplayerservice/nuplayer/HTTPLiveSource.cpp +++ b/media/libmediaplayerservice/nuplayer/HTTPLiveSource.cpp @@ -124,7 +124,14 @@ bool NuPlayer::HTTPLiveSource::feedMoreTSData() { : ATSParser::DISCONTINUITY_FORMATCHANGE, extra); } else { - mTSParser->feedTSPacket(buffer, sizeof(buffer)); + status_t err = mTSParser->feedTSPacket(buffer, sizeof(buffer)); + + if (err != OK) { + LOGE("TS Parser returned error %d", err); + mTSParser->signalEOS(err); + mEOS = true; + break; + } } mOffset += n; diff --git a/media/libmediaplayerservice/nuplayer/StreamingSource.cpp b/media/libmediaplayerservice/nuplayer/StreamingSource.cpp index f41e9d2..a741987 100644 --- a/media/libmediaplayerservice/nuplayer/StreamingSource.cpp +++ b/media/libmediaplayerservice/nuplayer/StreamingSource.cpp @@ -86,7 +86,15 @@ bool NuPlayer::StreamingSource::feedMoreTSData() { : ATSParser::DISCONTINUITY_FORMATCHANGE, extra); } else { - mTSParser->feedTSPacket(buffer, sizeof(buffer)); + status_t err = mTSParser->feedTSPacket(buffer, sizeof(buffer)); + + if (err != OK) { + LOGE("TS Parser returned error %d", err); + + mTSParser->signalEOS(err); + mEOS = true; + break; + } } } } |