summaryrefslogtreecommitdiffstats
path: root/video/mp_image.c
diff options
context:
space:
mode:
Diffstat (limited to 'video/mp_image.c')
-rw-r--r--video/mp_image.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/video/mp_image.c b/video/mp_image.c
index d5ce8da14b..36e3ba6c25 100644
--- a/video/mp_image.c
+++ b/video/mp_image.c
@@ -1044,7 +1044,6 @@ struct mp_image *mp_image_from_av_frame(struct AVFrame *src)
if (src->opaque_ref) {
struct mp_image_params *p = (void *)src->opaque_ref->data;
- dst->params.rotate = p->rotate;
dst->params.stereo3d = p->stereo3d;
// Might be incorrect if colorspace changes.
dst->params.color.light = p->color.light;
@@ -1197,6 +1196,14 @@ struct AVFrame *mp_image_to_av_frame(struct mp_image *src)
clm->MaxCLL = src->params.color.sig_peak * MP_REF_WHITE;
}
+ {
+ AVFrameSideData *sd = av_frame_new_side_data(dst,
+ AV_FRAME_DATA_DISPLAYMATRIX,
+ sizeof(int32_t) * 9);
+ MP_HANDLE_OOM(sd);
+ av_display_rotation_set((int32_t *)sd->data, src->params.rotate);
+ }
+
// Add back side data, but only for types which are not specially handled
// above. Keep in mind that the types above will be out of sync anyway.
for (int n = 0; n < new_ref->num_ff_side_data; n++) {