Otherwise, the user requested priority of packet side data will be ignored.
Unified · Split
| @@ -2875,15 +2875,15 @@ the_end: · 2874 unmodified lines | ||
| 2875 | 2875 | AVFrameSideData *sd = NULL; |
| 2876 | 2876 | |
| 2877 | 2877 | if (orientation >= 2 && orientation <= 8) { |
| 2878 | − int32_t *matrix; | |
| 2879 | − | |
| 2880 | − sd = av_frame_new_side_data(frame, AV_FRAME_DATA_DISPLAYMATRIX, sizeof(int32_t) * 9); | |
| 2881 | − if (!sd) { | |
| 2878 | + ret = ff_frame_new_side_data(avctx, frame, AV_FRAME_DATA_DISPLAYMATRIX, sizeof(int32_t) * 9, &sd); | |
| 2879 | + if (ret < 0) { | |
| 2882 | 2880 | av_log(avctx, AV_LOG_ERROR, "Could not allocate frame side data\n"); |
| 2883 | − return AVERROR(ENOMEM); | |
| 2881 | + return ret; | |
| 2884 | 2882 | } |
| 2883 | + } | |
| 2885 | 2884 | |
| 2886 | − matrix = (int32_t *)sd->data; | |
| 2885 | + if (sd) { | |
| 2886 | + int32_t *matrix = (int32_t *)sd->data; | |
| 2887 | 2887 | |
| 2888 | 2888 | switch (orientation) { |
| 2889 | 2889 | case 2: |