summaryrefslogtreecommitdiff
path: root/libavcodec/dnxhd_parser.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2019-07-06 09:52:50 +0200
committerMichael Niedermayer <michael@niedermayer.cc>2019-07-17 23:18:50 +0200
commit827faa18cfd08eed49ffff9129ef4378b8ccf5a5 (patch)
treed86b13e9063e8f8ad84fd118690a127090f0d5ab /libavcodec/dnxhd_parser.c
parent1707dbdf49b22021b0845482806b881093534f2f (diff)
downloadffmpeg-827faa18cfd08eed49ffff9129ef4378b8ccf5a5.tar.gz
avcodec/dnxhd_parser: Optimize insufficient buf size case
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavcodec/dnxhd_parser.c')
-rw-r--r--libavcodec/dnxhd_parser.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/libavcodec/dnxhd_parser.c b/libavcodec/dnxhd_parser.c
index f657af8f41..31a3158fea 100644
--- a/libavcodec/dnxhd_parser.c
+++ b/libavcodec/dnxhd_parser.c
@@ -88,6 +88,10 @@ static int dnxhd_find_frame_end(DNXHDParserContext *dctx,
return remaining;
} else {
dctx->remaining -= buf_size;
+ // Update variables for correctness, they are currently not used beyond here
+ state = -1;
+ dctx->cur_byte += buf_size - i;
+ break;
}
}
}