Bug 1138983 - RTSP not enabled in Lollipop. r=vchang
authorEthan Tseng <ettseng@mozilla.com>
Thu, 05 Mar 2015 13:34:08 +0800
changeset 232145 fcaa845b28e8f7dca8006ea3d7f2c01ab76e4de3
parent 232144 5aaadad026257db63613324d4a62c980b2a442c4
child 232146 9f1ed4568d8e87304fc7d76d80845a6973e99998
push id14314
push usercbook@mozilla.com
push dateFri, 06 Mar 2015 13:24:36 +0000
treeherderb2g-inbound@fcaa845b28e8 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersvchang
bugs1138983
milestone39.0a1
Bug 1138983 - RTSP not enabled in Lollipop. r=vchang
configure.in
netwerk/protocol/rtsp/rtsp/RTSPSource.cpp
--- a/configure.in
+++ b/configure.in
@@ -298,16 +298,17 @@ if test -n "$gonkdir" ; then
         MOZ_FMP4=
         MOZ_B2G_CAMERA=1
         MOZ_B2G_BT=1
         MOZ_B2G_BT_BLUEDROID=1
         if test -d "$gonkdir/system/bluetoothd"; then
             MOZ_B2G_BT_DAEMON=1
         fi
         MOZ_NFC=1
+        MOZ_RTSP=1
         ;;
     *)
         AC_MSG_ERROR([Unsupported platform version: $ANDROID_VERSION])
         ;;
     esac
     CPPFLAGS="-DANDROID $TARGET_C_INCLUDES -I$gonkdir/system -I$gonkdir/system/core/include -isystem $gonkdir/bionic -I$gonkdir/hardware/libhardware/include -I$gonkdir/external/valgrind/fxos-include $GONK_INCLUDES $CPPFLAGS"
     CFLAGS="-mandroid -fno-short-enums -fno-exceptions $CFLAGS"
     CXXFLAGS="-mandroid -fno-short-enums -fno-exceptions -Wno-psabi $CXXFLAGS $STLPORT_CPPFLAGS"
--- a/netwerk/protocol/rtsp/rtsp/RTSPSource.cpp
+++ b/netwerk/protocol/rtsp/rtsp/RTSPSource.cpp
@@ -503,17 +503,22 @@ void RTSPSource::onMessageReceived(const
         {
             size_t trackIndex;
             CHECK(msg->findSize("trackIndex", &trackIndex));
             CHECK_LT(trackIndex, mTracks.size());
 
             TrackInfo *info = &mTracks.editItemAt(trackIndex);
             sp<AnotherPacketSource> source = info->mSource;
             if (source != NULL) {
+#if ANDROID_VERSION >= 21
+                source->queueDiscontinuity(ATSParser::DISCONTINUITY_SEEK, NULL,
+                                           true /* discard */);
+#else
                 source->queueDiscontinuity(ATSParser::DISCONTINUITY_SEEK, NULL);
+#endif
             }
 
             break;
         }
 
         case RtspConnectionHandler::kWhatNormalPlayTimeMapping:
         {
             size_t trackIndex;