ref: 9f53661e8b8cfe288c8c8674810f2291de5cc1f2
parent: 71b188540370211d80555896d40ef69ac8c16134
parent: 88d703cd4d7f091b9e5c053cd74170ca6bfcc8ad
author: Ronald S. Bultje <rbultje@google.com>
date: Fri Nov 9 04:14:06 EST 2012
Merge "Fix another crash in vpxenc with --pass=1 and --test-decode." into experimental
--- a/vpxenc.c
+++ b/vpxenc.c
@@ -2132,12 +2132,11 @@
const struct vpx_codec_enc_cfg *cfg = &stream->config.cfg;
vpx_codec_iter_t iter = NULL;
+ *got_data = 0;
while ((pkt = vpx_codec_get_cx_data(&stream->encoder, &iter))) {
static size_t fsize = 0;
static off_t ivf_header_pos = 0;
- *got_data = 1;
-
switch (pkt->kind) {
case VPX_CODEC_CX_FRAME_PKT:
if (!(pkt->data.frame.flags & VPX_FRAME_IS_FRAGMENT)) {
@@ -2178,6 +2177,7 @@
}
stream->nbytes += pkt->data.raw.sz;
+ *got_data = 1;
if (global->test_decode) {
vpx_codec_decode(&stream->decoder, pkt->data.frame.buf,
pkt->data.frame.sz, NULL, 0);