summaryrefslogtreecommitdiff
path: root/vp9
diff options
context:
space:
mode:
authorVignesh Venkatasubramanian <vigneshv@google.com>2017-09-25 16:56:04 -0700
committerVignesh Venkatasubramanian <vigneshv@google.com>2017-09-27 09:59:39 -0700
commit530e60143a60b77ab749003bf991a58f083752a3 (patch)
tree76ea4503fe1a6e2e0cba65c6d2a0a11965d91ccd /vp9
parenta059dc09861d8299b6736f06825146b7009ad520 (diff)
downloadlibvpx-530e60143a60b77ab749003bf991a58f083752a3.tar
libvpx-530e60143a60b77ab749003bf991a58f083752a3.tar.gz
libvpx-530e60143a60b77ab749003bf991a58f083752a3.tar.bz2
libvpx-530e60143a60b77ab749003bf991a58f083752a3.zip
vp9_dx_iface: Stop using iter parameter incorrectly
'iter' parameter is being checked for NULL in every call to decoder_get_frame which is quite pointless because it is always going to be NULL unless the application changed it. The code works as described only because vp9_get_raw_frame returns -1 on all subsequent calls after the first. Change-Id: Ic736b9e8fe36fc1430fc11d6a9b292be02497248
Diffstat (limited to 'vp9')
-rw-r--r--vp9/vp9_dx_iface.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/vp9/vp9_dx_iface.c b/vp9/vp9_dx_iface.c
index b7dc14e4b..657490f4b 100644
--- a/vp9/vp9_dx_iface.c
+++ b/vp9/vp9_dx_iface.c
@@ -378,9 +378,11 @@ static vpx_image_t *decoder_get_frame(vpx_codec_alg_priv_t *ctx,
vpx_codec_iter_t *iter) {
vpx_image_t *img = NULL;
- // iter acts as a flip flop, so an image is only returned on the first
- // call to get_frame.
- if (*iter == NULL && ctx->pbi != NULL) {
+ // Legacy parameter carried over from VP8. Has no effect for VP9 since we
+ // always return only 1 frame per decode call.
+ (void)iter;
+
+ if (ctx->pbi != NULL) {
YV12_BUFFER_CONFIG sd;
vp9_ppflags_t flags = { 0, 0, 0 };
if (ctx->base.init_flags & VPX_CODEC_USE_POSTPROC) set_ppflags(ctx, &flags);