cosmetic changes

Change-Id: I2639f49f38b3b0cafa24651d2d680f29e1cf41ff
diff --git a/src/third_party/starboard/rdk/shared/drm/gst_decryptor_ocdm.cc b/src/third_party/starboard/rdk/shared/drm/gst_decryptor_ocdm.cc
index 664cf3b..7c0f64a 100644
--- a/src/third_party/starboard/rdk/shared/drm/gst_decryptor_ocdm.cc
+++ b/src/third_party/starboard/rdk/shared/drm/gst_decryptor_ocdm.cc
@@ -106,8 +106,7 @@
     GstBuffer* iv, GstBuffer* key) {
 
     GST_TRACE_OBJECT(self, "buf=(%" GST_PTR_FORMAT "), "
-                     "subsample_count=%u, subsamples=(%" GST_PTR_FORMAT " ), "
-                     "iv=(%" GST_PTR_FORMAT "), key=(%" GST_PTR_FORMAT ")",
+                     "subsample_count=%u, subsamples=(%p), iv=(%p), key=(%p)",
                      buffer, subsample_count, subsamples, iv, key);
     if (!drm_system_) {
       GstContext* context = gst_element_get_context(GST_ELEMENT(self), "cobalt-drm-system");
@@ -288,6 +287,7 @@
   CobaltOcdmDecryptorPrivate* priv = GST_COBALT_OCDM_DECRYPTOR_GET_PRIVATE(self);
 
   priv->~CobaltOcdmDecryptorPrivate();
+
   GST_CALL_PARENT(G_OBJECT_CLASS, finalize, (object));
 }
 
diff --git a/src/third_party/starboard/rdk/shared/player/player_internal.cc b/src/third_party/starboard/rdk/shared/player/player_internal.cc
index 3f3d497..0dc17f6 100644
--- a/src/third_party/starboard/rdk/shared/player/player_internal.cc
+++ b/src/third_party/starboard/rdk/shared/player/player_internal.cc
@@ -1211,7 +1211,8 @@
       player_status_func_(player_status_func),
       player_error_func_(player_error_func),
       context_(context) {
-  if (getenv("COBALT_DISABLE_AUDIO"))
+  static bool disable_audio = !!getenv("COBALT_DISABLE_AUDIO");
+  if (disable_audio)
     audio_codec_ = kSbMediaAudioCodecNone;
   if (audio_codec_ == kSbMediaAudioCodecNone)
     has_enough_data_ &= ~static_cast<int>(MediaType::kAudio);
@@ -1696,8 +1697,9 @@
                               GstElement* element,
                               PlayerImpl* self) {
   if (GST_IS_BASE_SINK(element)) {
+    static bool disable_wait_video = !!getenv("COBALT_AML_DISABLE_WAIT_VIDEO");
     bool has_video = (self->video_codec_ != kSbMediaVideoCodecNone);
-    if (has_video && g_str_has_prefix(GST_ELEMENT_NAME(element), "amlhalasink") && !self->drm_system_) {
+    if (has_video && g_str_has_prefix(GST_ELEMENT_NAME(element), "amlhalasink") && !disable_wait_video) {
       g_object_set(element, "wait-video", TRUE, nullptr);
     }
   }
@@ -1757,9 +1759,6 @@
   gst_app_src_push_buffer(GST_APP_SRC(src), buffer);
 
   ::starboard::ScopedLock lock(mutex_);
-  if (sample_type == kSbMediaTypeVideo)
-    ++total_video_frames_;
-
   // Wait for need-data to trigger instead.
   if (state_ == State::kInitial || state_ == State::kInitialPreroll)
     return true;
@@ -1928,6 +1927,8 @@
     ::starboard::ScopedLock lock(mutex_);
     keep_samples = is_seek_pending_ || pending_rate_ != .0;
     serial = samples_serial_[ (sample_type == kSbMediaTypeVideo ? kVideoIndex : kAudioIndex) ]++;
+    if (sample_type == kSbMediaTypeVideo)
+      ++total_video_frames_;
   }
 
   if (keep_samples) {