Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d8ad2fab authored by Andreas Huber's avatar Andreas Huber Committed by Android Git Automerger
Browse files

am 40461ee7: am cd556b82: Merge "Instead of asserting, signal a runtime error...

am 40461ee7: am cd556b82: Merge "Instead of asserting, signal a runtime error if the session doesn\'t contain" into ics-mr1

* commit '40461ee7':
  Instead of asserting, signal a runtime error if the session doesn't contain
parents 5dd4c6bc 40461ee7
Loading
Loading
Loading
Loading
+15 −2
Original line number Diff line number Diff line
@@ -463,11 +463,20 @@ struct MyHandler : public AHandler {
                                mBaseURL = tmp;
                            }

                            CHECK_GT(mSessionDesc->countTracks(), 1u);
                            if (mSessionDesc->countTracks() < 2) {
                                // There's no actual tracks in this session.
                                // The first "track" is merely session meta
                                // data.

                                LOGW("Session doesn't contain any playable "
                                     "tracks. Aborting.");
                                result = ERROR_UNSUPPORTED;
                            } else {
                                setupTrack(1);
                            }
                        }
                    }
                }

                if (result != OK) {
                    sp<AMessage> reply = new AMessage('disc', id());
@@ -783,9 +792,13 @@ struct MyHandler : public AHandler {
                }

                if (mNumAccessUnitsReceived == 0) {
#if 0
                    LOGI("stream ended? aborting.");
                    (new AMessage('abor', id()))->post();
                    break;
#else
                    LOGI("haven't seen an AU in a looong time.");
#endif
                }

                mNumAccessUnitsReceived = 0;