comparison imgconvert.c @ 12372:914f484bb476 libavcodec

Remove use of the deprecated function avcodec_check_dimensions(), use av_check_image_size() instead.
author stefano
date Fri, 06 Aug 2010 09:37:04 +0000
parents 035ca6548e29
children e1ef713061ce
comparison
equal deleted inserted replaced
12371:5dffb531b1cc 12372:914f484bb476
513 513
514 int avpicture_fill(AVPicture *picture, uint8_t *ptr, 514 int avpicture_fill(AVPicture *picture, uint8_t *ptr,
515 enum PixelFormat pix_fmt, int width, int height) 515 enum PixelFormat pix_fmt, int width, int height)
516 { 516 {
517 517
518 if(avcodec_check_dimensions(NULL, width, height)) 518 if(av_check_image_size(width, height, 0, NULL))
519 return -1; 519 return -1;
520 520
521 if (av_fill_image_linesizes(picture->linesize, pix_fmt, width)) 521 if (av_fill_image_linesizes(picture->linesize, pix_fmt, width))
522 return -1; 522 return -1;
523 523
595 } 595 }
596 596
597 int avpicture_get_size(enum PixelFormat pix_fmt, int width, int height) 597 int avpicture_get_size(enum PixelFormat pix_fmt, int width, int height)
598 { 598 {
599 AVPicture dummy_pict; 599 AVPicture dummy_pict;
600 if(avcodec_check_dimensions(NULL, width, height)) 600 if(av_check_image_size(width, height, 0, NULL))
601 return -1; 601 return -1;
602 switch (pix_fmt) { 602 switch (pix_fmt) {
603 case PIX_FMT_RGB8: 603 case PIX_FMT_RGB8:
604 case PIX_FMT_BGR8: 604 case PIX_FMT_BGR8:
605 case PIX_FMT_RGB4_BYTE: 605 case PIX_FMT_RGB4_BYTE: