diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2011-04-07 00:24:53 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2011-04-07 01:48:47 +0200 |
commit | 9f8008a9815ed5ee8846de2bb97c980ddb7b2485 (patch) | |
tree | 91366e6eef9e0002309ed6cb53a9463e73fe3436 /ffplay.c | |
parent | 454fab721a2d518d814ce50ab545f89af107851d (diff) | |
download | ffmpeg-9f8008a9815ed5ee8846de2bb97c980ddb7b2485.tar.gz |
move image check down in ffplay.c
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'ffplay.c')
-rw-r--r-- | ffplay.c | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -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; |