From 7496d66d7bd617119245ca87f72c481493a756ce Mon Sep 17 00:00:00 2001 From: Angie Chiang Date: Tue, 8 Aug 2017 11:30:46 -0700 Subject: [PATCH] Coding path sync: filter packets from encoder. We're only interested in AOM_CODEC_CX_FRAME_PKT, but the encoder might output packets from other types (e.g when CONFIG_INTERNAL_STATS). Change-Id: I1c153ca7519067dc82cb76b131b09a537bb37f62 --- test/coding_path_sync.cc | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/test/coding_path_sync.cc b/test/coding_path_sync.cc index f4bd4b8b7..46ccd1aee 100644 --- a/test/coding_path_sync.cc +++ b/test/coding_path_sync.cc @@ -64,7 +64,14 @@ class CompressedSource { aom_codec_encode(&enc_, &img, frame_count_++, 1, 0, 0); aom_codec_iter_t iter = NULL; - return aom_codec_get_cx_data(&enc_, &iter); + + const aom_codec_cx_pkt_t *pkt = NULL; + + do { + pkt = aom_codec_get_cx_data(&enc_, &iter); + } while (pkt && pkt->kind != AOM_CODEC_CX_FRAME_PKT); + + return pkt; } private: -- GitLab