mirror of https://github.com/mpv-player/mpv
mp_image: make mp_image_copy_fields_* private
Future code should always use mp_image_{to,from}_av_frame(). Everything else is way too messy and fragile.
This commit is contained in:
parent
a77cbc504a
commit
050b17ca9c
|
@ -666,7 +666,7 @@ void mp_image_params_guess_csp(struct mp_image_params *params)
|
|||
|
||||
// Copy properties and data of the AVFrame into the mp_image, without taking
|
||||
// care of memory management issues.
|
||||
void mp_image_copy_fields_from_av_frame(struct mp_image *dst,
|
||||
static void mp_image_copy_fields_from_av_frame(struct mp_image *dst,
|
||||
struct AVFrame *src)
|
||||
{
|
||||
mp_image_setfmt(dst, pixfmt2imgfmt(src->format));
|
||||
|
@ -690,7 +690,7 @@ void mp_image_copy_fields_from_av_frame(struct mp_image *dst,
|
|||
|
||||
// Copy properties and data of the mp_image into the AVFrame, without taking
|
||||
// care of memory management issues.
|
||||
void mp_image_copy_fields_to_av_frame(struct AVFrame *dst,
|
||||
static void mp_image_copy_fields_to_av_frame(struct AVFrame *dst,
|
||||
struct mp_image *src)
|
||||
{
|
||||
dst->format = imgfmt2pixfmt(src->imgfmt);
|
||||
|
|
|
@ -154,10 +154,6 @@ void mp_image_set_attributes(struct mp_image *image,
|
|||
const struct mp_image_params *params);
|
||||
|
||||
struct AVFrame;
|
||||
void mp_image_copy_fields_from_av_frame(struct mp_image *dst,
|
||||
struct AVFrame *src);
|
||||
void mp_image_copy_fields_to_av_frame(struct AVFrame *dst,
|
||||
struct mp_image *src);
|
||||
struct mp_image *mp_image_from_av_frame(struct AVFrame *av_frame);
|
||||
struct AVFrame *mp_image_to_av_frame(struct mp_image *img);
|
||||
struct AVFrame *mp_image_to_av_frame_and_unref(struct mp_image *img);
|
||||
|
|
Loading…
Reference in New Issue