* @}
*/
- #if FF_API_SET_DIMENSIONS
- /**
- * @deprecated this function is not supposed to be used from outside of lavc
- */
- attribute_deprecated
- void avcodec_set_dimensions(AVCodecContext *s, int width, int height);
- #endif
-
+#if FF_API_TAG_STRING
/**
* Put a string representing the codec tag codec_tag in buf.
*
}
#endif
- #if FF_API_SET_DIMENSIONS
- void avcodec_set_dimensions(AVCodecContext *s, int width, int height)
- {
- int ret = ff_set_dimensions(s, width, height);
- if (ret < 0) {
- av_log(s, AV_LOG_WARNING, "Failed to set dimensions %d %d\n", width, height);
- }
- }
- #endif
-
int ff_set_dimensions(AVCodecContext *s, int width, int height)
{
- int ret = av_image_check_size(width, height, 0, s);
+ int ret = av_image_check_size2(width, height, s->max_pixels, AV_PIX_FMT_NONE, 0, s);
if (ret < 0)
width = height = 0;
* FF_API_* defines may be placed below to indicate public API that will be
* dropped at a future version bump. The defines themselves are not part of
* the public API and may change, break or disappear at any time.
+ *
+ * @note, when bumping the major version it is recommended to manually
+ * disable each FF_API_* in its own commit instead of disabling them all
+ * at once through the bump. This improves the git bisect-ability of the change.
*/
- #ifndef FF_API_SET_DIMENSIONS
- #define FF_API_SET_DIMENSIONS (LIBAVCODEC_VERSION_MAJOR < 58)
- #endif
+#ifndef FF_API_LOWRES
+#define FF_API_LOWRES (LIBAVCODEC_VERSION_MAJOR < 59)
+#endif
#ifndef FF_API_DEBUG_MV
#define FF_API_DEBUG_MV (LIBAVCODEC_VERSION_MAJOR < 58)
#endif