diff options
author | Stefano Sabatini <stefasab@gmail.com> | 2012-08-30 22:44:36 +0200 |
---|---|---|
committer | Stefano Sabatini <stefasab@gmail.com> | 2012-08-30 23:39:32 +0200 |
commit | db0a0aa243d47ee471ad472b5b15b33b11e30405 (patch) | |
tree | 779e843c0b2b07c8611ebc2146c34effc57d5f5e | |
parent | 952caf11f20c3db9cf482d786941c3d391703680 (diff) | |
download | ffmpeg-streaming-db0a0aa243d47ee471ad472b5b15b33b11e30405.zip ffmpeg-streaming-db0a0aa243d47ee471ad472b5b15b33b11e30405.tar.gz |
examples/scaling_video: add logging in case of image allocation failure
-rw-r--r-- | doc/examples/scaling_video.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/doc/examples/scaling_video.c b/doc/examples/scaling_video.c index 144b54a..684d2ca 100644 --- a/doc/examples/scaling_video.c +++ b/doc/examples/scaling_video.c @@ -106,12 +106,16 @@ int main(int argc, char **argv) /* allocate source and destination image buffers */ if ((ret = av_image_alloc(src_data, src_linesize, - src_w, src_h, src_pix_fmt, 16)) < 0) + src_w, src_h, src_pix_fmt, 16)) < 0) { + fprintf(stderr, "Could not allocate source image\n"); goto end; + } if ((ret = av_image_alloc(dst_data, dst_linesize, - dst_w, dst_h, dst_pix_fmt, 16)) < 0) + dst_w, dst_h, dst_pix_fmt, 16)) < 0) { + fprintf(stderr, "Could not allocate destination image\n"); goto end; + } for (i = 0; i < 100; i++) { char filename[1024]; |