videodecoder: Video size change is independent of new sps

BZ: 159376

Some malformed clips have more than one PPS and the second PPS will
refer to a non-exist SPS so that it reports a new SPS is found.

The log logic will set mSizeChanged to be true once data->new_sps is
1 and HandleFormatChange will be called. As the buffer containing the
second PPS will be retained during format change, the decoder will fall
into a infinite loop of format change.

Change-Id: I8d5a3e22bf60d6abe2233fbf709605d490ea35f5
Signed-off-by: Dan Liang <>
diff --git a/videodecoder/VideoDecoderAVC.cpp b/videodecoder/VideoDecoderAVC.cpp
index 57d3557..5548625 100644
--- a/videodecoder/VideoDecoderAVC.cpp
+++ b/videodecoder/VideoDecoderAVC.cpp
@@ -704,11 +704,6 @@
         mVideoFormatInfo.height = height;
-    if (data->new_sps) {
-        mSizeChanged = true;
-        ITRACE("New sequence is received. Assuming video size is changed.");
-    }
     // video_range has default value of 0.
     mVideoFormatInfo.videoRange = data->codec_data->video_full_range_flag;