fix coverity CID 1473571, 1473577 and 1482089
Showing the changes to libavfilter (1 of 1 file). Show all
Unified · Split
| @@ -154,7 +154,7 @@ static DNNReturnType proc_from_frame_to_dnn_frameprocessing(AVFrame *frame, DNND · 153 unmodified lines | ||
| 154 | 154 | } |
| 155 | 155 | sws_scale(sws_ctx, (const uint8_t **)frame->data, |
| 156 | 156 | frame->linesize, 0, frame->height, |
| 157 | − (uint8_t * const*)(&input->data), | |
| 157 | + (uint8_t * const [4]){input->data, 0, 0, 0}, | |
| 158 | 158 | (const int [4]){frame->width * sizeof(float), 0, 0, 0}); |
| 159 | 159 | sws_freeContext(sws_ctx); |
| 160 | 160 | break; |
| @@ -236,7 +236,7 @@ DNNReturnType ff_frame_to_dnn_classify(AVFrame *frame, DNNData *input, uint32_t · 75 unmodified lines | ||
| 236 | 236 | |
| 237 | 237 | sws_scale(sws_ctx, (const uint8_t *const *)&bbox_data, frame->linesize, |
| 238 | 238 | 0, height, |
| 239 | − (uint8_t *const *)(&input->data), linesizes); | |
| 239 | + (uint8_t *const [4]){input->data, 0, 0, 0}, linesizes); | |
| 240 | 240 | |
| 241 | 241 | sws_freeContext(sws_ctx); |
| 242 | 242 | |
| @@ -266,7 +266,7 @@ static DNNReturnType proc_from_frame_to_dnn_analytics(AVFrame *frame, DNNData *i · 23 unmodified lines | ||
| 266 | 266 | } |
| 267 | 267 | |
| 268 | 268 | sws_scale(sws_ctx, (const uint8_t *const *)frame->data, frame->linesize, 0, frame->height, |
| 269 | − (uint8_t *const *)(&input->data), linesizes); | |
| 269 | + (uint8_t *const [4]){input->data, 0, 0, 0}, linesizes); | |
| 270 | 270 | |
| 271 | 271 | sws_freeContext(sws_ctx); |
| 272 | 272 | return DNN_SUCCESS; |