From 5fd0fcee737b6c23ed36842a913cd6ccc48af1fe Mon Sep 17 00:00:00 2001 From: Mike Jerris Date: Thu, 20 Apr 2017 15:49:30 -0500 Subject: [PATCH] FS-10246: [build] fix code can not be reached build error --- src/switch_vpx.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/switch_vpx.c b/src/switch_vpx.c index 78bf2245be..1f6edcb08f 100644 --- a/src/switch_vpx.c +++ b/src/switch_vpx.c @@ -636,6 +636,7 @@ static switch_status_t consume_partition(vpx_context_t *context, switch_frame_t uint8_t *body; uint32_t hdrlen = 0, payload_size = 0, packet_size = 0, start = 0, key = 0; switch_size_t remaining_bytes = 0; + switch_status_t status; if (!context->pkt) { if ((context->pkt = vpx_codec_get_cx_data(&context->encoder, &context->enc_iter))) { @@ -756,17 +757,19 @@ static switch_status_t consume_partition(vpx_context_t *context, switch_frame_t context->pkt = NULL; frame->datalen += remaining_bytes; frame->m = 1; - return SWITCH_STATUS_SUCCESS; + status = SWITCH_STATUS_SUCCESS; } else { switch_buffer_read(context->pbuffer, body, payload_size); frame->datalen += payload_size; frame->m = 0; - return SWITCH_STATUS_MORE_DATA; + status = SWITCH_STATUS_MORE_DATA; } if (frame->m && context->is_vp9) { payload_descriptor->vp9.end = 1; } + + return status; } static switch_status_t reset_codec_encoder(switch_codec_t *codec)