[FFmpeg-cvslog] move image check down in ffplay.c
Michael Niedermayer
git at videolan.org
Thu Apr 7 01:49:39 CEST 2011
ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Thu Apr 7 00:24:53 2011 +0200| [9f8008a9815ed5ee8846de2bb97c980ddb7b2485] | committer: Michael Niedermayer
move image check down in ffplay.c
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=9f8008a9815ed5ee8846de2bb97c980ddb7b2485
---
ffplay.c | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/ffplay.c b/ffplay.c
index 2067a8f..56236d8 100644
--- a/ffplay.c
+++ b/ffplay.c
@@ -1582,9 +1582,6 @@ static int input_get_buffer(AVCodecContext *codec, AVFrame *pic)
int i, w, h, stride[4];
unsigned edge;
- if(av_image_check_size(w, h, 0, codec))
- return -1;
-
if (codec->codec->capabilities & CODEC_CAP_NEG_LINESIZES)
perms |= AV_PERM_NEG_LINESIZES;
@@ -1597,6 +1594,10 @@ static int input_get_buffer(AVCodecContext *codec, AVFrame *pic)
w = codec->width;
h = codec->height;
+
+ if(av_image_check_size(w, h, 0, codec))
+ return -1;
+
avcodec_align_dimensions2(codec, &w, &h, stride);
edge = codec->flags & CODEC_FLAG_EMU_EDGE ? 0 : avcodec_get_edge_width();
w += edge << 1;
More information about the ffmpeg-cvslog
mailing list