Bug 803086: Process NULL image chunks in NotifyQueuedTrackChanges() r=ekr
authorRandell Jesup <rjesup@jesup.org>
Fri, 19 Oct 2012 10:58:06 -0400
changeset 110908 c20ed5e12b8df3ca224ab42eb72bd97e22d4ea43
parent 110907 adc4333ea94582800247400a70841de2e47bb748
child 110909 a45fac177fc87ca8eed1bf403e4ccb28d4f8d8ff
push id93
push usernmatsakis@mozilla.com
push dateWed, 31 Oct 2012 21:26:57 +0000
reviewersekr
bugs803086
milestone19.0a1
Bug 803086: Process NULL image chunks in NotifyQueuedTrackChanges() r=ekr
media/webrtc/signaling/src/mediapipeline/MediaPipeline.cpp
--- a/media/webrtc/signaling/src/mediapipeline/MediaPipeline.cpp
+++ b/media/webrtc/signaling/src/mediapipeline/MediaPipeline.cpp
@@ -590,16 +590,20 @@ void MediaPipelineTransmit::ProcessAudio
 }
 
 #ifdef MOZILLA_INTERNAL_API
 void MediaPipelineTransmit::ProcessVideoChunk(VideoSessionConduit *conduit,
                                               TrackRate rate,
                                               VideoChunk& chunk) {
   // We now need to send the video frame to the other side
   layers::Image *img = chunk.mFrame.GetImage();
+  if (!img) {
+    // segment.AppendFrame() allows null images, which show up here as null
+    return;
+  }
 
   ImageFormat format = img->GetFormat();
 
   if (format != PLANAR_YCBCR) {
     MOZ_MTLOG(PR_LOG_ERROR, "Can't process non-YCBCR video");
     MOZ_ASSERT(PR_FALSE);
     return;
   }