summaryrefslogtreecommitdiff
path: root/libavcodec/mlp_parser.c
diff options
context:
space:
mode:
authorJames Almer <jamrial@gmail.com>2018-01-19 15:52:21 -0300
committerJames Almer <jamrial@gmail.com>2018-01-29 23:09:22 -0300
commit55ebf707d0abf720a2b02fc5ebc47eb742bfbe99 (patch)
treefb19b70d293d093d2c86885243f9ce8fdee83e32 /libavcodec/mlp_parser.c
parent63b5d04e331c2580726e8a6936fecc04b815c516 (diff)
avcodec/mlp_parser: don't try to combine frames when full frames are provided
Attempting full frame reconstruction is unnecessary for non raw containers, so just skip it altogether. Signed-off-by: James Almer <jamrial@gmail.com>
Diffstat (limited to 'libavcodec/mlp_parser.c')
-rw-r--r--libavcodec/mlp_parser.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/libavcodec/mlp_parser.c b/libavcodec/mlp_parser.c
index 3c0330f777..4827354f18 100644
--- a/libavcodec/mlp_parser.c
+++ b/libavcodec/mlp_parser.c
@@ -256,6 +256,9 @@ static int mlp_parse(AVCodecParserContext *s,
if (buf_size == 0)
return 0;
+ if (s->flags & PARSER_FLAG_COMPLETE_FRAMES) {
+ next = buf_size;
+ } else {
if (!mp->in_sync) {
// Not in sync - find a major sync header
@@ -315,6 +318,7 @@ static int mlp_parse(AVCodecParserContext *s,
}
mp->bytes_left = 0;
+ }
sync_present = (AV_RB32(buf + 4) & 0xfffffffe) == 0xf8726fba;