[FFmpeg-cvslog] avcodec/hevc_ps: Check cropping parameters more correctly
Michael Niedermayer
git at videolan.org
Sat Mar 28 12:25:45 CET 2015
ffmpeg | branch: release/2.6 | Michael Niedermayer <michaelni at gmx.at> | Sat Mar 21 12:54:16 2015 +0100| [87e2a689a884c79e25156fc45a0fe547501b8690] | committer: Michael Niedermayer
avcodec/hevc_ps: Check cropping parameters more correctly
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
(cherry picked from commit 06c70d45373dedc600f28e345685b130b60203c1)
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=87e2a689a884c79e25156fc45a0fe547501b8690
---
libavcodec/hevc_ps.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/libavcodec/hevc_ps.c b/libavcodec/hevc_ps.c
index 85ce2cc..075a4bd 100644
--- a/libavcodec/hevc_ps.c
+++ b/libavcodec/hevc_ps.c
@@ -1039,7 +1039,8 @@ int ff_hevc_decode_nal_sps(HEVCContext *s)
(sps->output_window.left_offset + sps->output_window.right_offset);
sps->output_height = sps->height -
(sps->output_window.top_offset + sps->output_window.bottom_offset);
- if (sps->output_width <= 0 || sps->output_height <= 0) {
+ if (sps->width <= sps->output_window.left_offset + (int64_t)sps->output_window.right_offset ||
+ sps->height <= sps->output_window.top_offset + (int64_t)sps->output_window.bottom_offset) {
av_log(s->avctx, AV_LOG_WARNING, "Invalid visible frame dimensions: %dx%d.\n",
sps->output_width, sps->output_height);
if (s->avctx->err_recognition & AV_EF_EXPLODE) {
More information about the ffmpeg-cvslog
mailing list