History

avcodec/mjpegdec: use ff_frame_new_side_data() to export display matrix

Otherwise, the user requested priority of packet side data will be ignored.

James Almer committed 1 year ago

Commit e0a971a1 parent 7cc24ce1 file · +6 −6Browse files

Showing the changes to libavcodec (1 of 1 file). Show all

Unified · Split

libavcodec/mjpegdec.c+6−6
@@ -2875,15 +2875,15 @@ the_end: · 2874 unmodified lines
2875 AVFrameSideData *sd = NULL;2875 AVFrameSideData *sd = NULL;
2876 2876
2877 if (orientation >= 2 && orientation <= 8) {2877 if (orientation >= 2 && orientation <= 8) {
2878 int32_t *matrix;2878 ret = ff_frame_new_side_data(avctx, frame, AV_FRAME_DATA_DISPLAYMATRIX, sizeof(int32_t) * 9, &sd);
2879 2879 if (ret < 0) {
2880 sd = av_frame_new_side_data(frame, AV_FRAME_DATA_DISPLAYMATRIX, sizeof(int32_t) * 9);
2881 if (!sd) {
2882 av_log(avctx, AV_LOG_ERROR, "Could not allocate frame side data\n");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 switch (orientation) {2888 switch (orientation) {
2889 case 2:2889 case 2:

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t