| 567 | } |
| 568 | |
| 569 | void hb_buffer_remove_side_data(hb_buffer_t *buf, enum AVFrameSideDataType type) |
| 570 | { |
| 571 | if (buf->storage_type == AVFRAME) |
| 572 | { |
| 573 | AVFrame *frame = (AVFrame *)buf->storage; |
| 574 | av_frame_remove_side_data(frame, type); |
| 575 | buf->nb_side_data = frame->nb_side_data; |
| 576 | } |
| 577 | else |
| 578 | { |
| 579 | for (int i = buf->nb_side_data - 1; i >= 0; i--) |
| 580 | { |
| 581 | AVFrameSideData *sd = buf->side_data[i]; |
| 582 | if (sd->type == type) |
| 583 | { |
| 584 | free_side_data((AVFrameSideData **)&buf->side_data[i]); |
| 585 | buf->side_data[i] = buf->side_data[buf->nb_side_data - 1]; |
| 586 | buf->nb_side_data--; |
| 587 | } |
| 588 | } |
| 589 | } |
| 590 | } |
| 591 | |
| 592 | void hb_buffer_wipe_side_data(hb_buffer_t *buf) |
| 593 | { |
no test coverage detected