mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-12-13 02:20:07 +01:00
Merge commit '7644f5a80787c9b608b82873604805d7e38a6a18'
* commit '7644f5a80787c9b608b82873604805d7e38a6a18': lavc: replace avcodec_set_dimensions with ff_set_dimensions Conflicts: libavcodec/utils.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
@@ -230,12 +230,26 @@ unsigned avcodec_get_edge_width(void)
|
||||
return EDGE_WIDTH;
|
||||
}
|
||||
|
||||
#if FF_API_SET_DIMENSIONS
|
||||
void avcodec_set_dimensions(AVCodecContext *s, int width, int height)
|
||||
{
|
||||
ff_set_dimensions(s, width, height);
|
||||
}
|
||||
#endif
|
||||
|
||||
int ff_set_dimensions(AVCodecContext *s, int width, int height)
|
||||
{
|
||||
int ret = av_image_check_size(width, height, 0, s);
|
||||
|
||||
if (ret < 0)
|
||||
width = height = 0;
|
||||
|
||||
s->coded_width = width;
|
||||
s->coded_height = height;
|
||||
s->width = FF_CEIL_RSHIFT(width, s->lowres);
|
||||
s->height = FF_CEIL_RSHIFT(height, s->lowres);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
#if HAVE_NEON || ARCH_PPC || HAVE_MMX
|
||||
|
||||
Reference in New Issue
Block a user