[FFmpeg-cvslog] avcodec/dpx_parser: Allow frame size to be too small
Michael Niedermayer
git at videolan.org
Thu May 29 17:33:07 CEST 2014
ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Thu May 29 17:26:26 2014 +0200| [fba0ac28055d3dca2846ea41d3326f08455d1a4d] | committer: Michael Niedermayer
avcodec/dpx_parser: Allow frame size to be too small
Fixes Ticket3402
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=fba0ac28055d3dca2846ea41d3326f08455d1a4d
---
libavcodec/dpx_parser.c | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/libavcodec/dpx_parser.c b/libavcodec/dpx_parser.c
index 5f29eee..db6ebf7 100644
--- a/libavcodec/dpx_parser.c
+++ b/libavcodec/dpx_parser.c
@@ -68,7 +68,6 @@ static int dpx_parse(AVCodecParserContext *s, AVCodecContext *avctx,
d->remaining_size -= i;
if (d->remaining_size)
goto flush;
- next = i;
}
}
@@ -84,8 +83,15 @@ static int dpx_parse(AVCodecParserContext *s, AVCodecContext *avctx,
if (d->fsize > buf_size - i + 19)
d->remaining_size = d->fsize - buf_size + i - 19;
else
- next = d->fsize + i - 19;
+ i += d->fsize - 19;
+
break;
+ } else if (d->index > 17) {
+ if (d->pc.state == MKBETAG('S','D','P','X') ||
+ d->pc.state == MKTAG('S','D','P','X')) {
+ next = i - 4;
+ break;
+ }
}
}
More information about the ffmpeg-cvslog
mailing list