Unified · Split
| @@ -730,7 +730,7 @@ int av_frame_copy_props(AVFrame *dst, const AVFrame *src) · 729 unmodified lines | |||
| 730 | 730 | ||
| 731 | AVBufferRef *av_frame_get_plane_buffer(const AVFrame *frame, int plane) | 731 | AVBufferRef *av_frame_get_plane_buffer(const AVFrame *frame, int plane) |
| 732 | { | 732 | { |
| 733 | uint8_t *data; | 733 | uintptr_t data; |
| 734 | int planes; | 734 | int planes; |
| 735 | 735 | ||
| 736 | if (frame->nb_samples) { | 736 | if (frame->nb_samples) { |
| @@ -743,16 +743,20 @@ AVBufferRef *av_frame_get_plane_buffer(const AVFrame *frame, int plane) · 6 unmodified lines | |||
| 743 | 743 | ||
| 744 | if (plane < 0 || plane >= planes || !frame->extended_data[plane]) | 744 | if (plane < 0 || plane >= planes || !frame->extended_data[plane]) |
| 745 | return NULL; | 745 | return NULL; |
| 746 | data = frame->extended_data[plane]; | 746 | data = (uintptr_t)frame->extended_data[plane]; |
| 747 | 747 | ||
| 748 | for (int i = 0; i < FF_ARRAY_ELEMS(frame->buf) && frame->buf[i]; i++) { | 748 | for (int i = 0; i < FF_ARRAY_ELEMS(frame->buf) && frame->buf[i]; i++) { |
| 749 | AVBufferRef *buf = frame->buf[i]; | 749 | AVBufferRef *buf = frame->buf[i]; |
| 750 | if (data >= buf->data && data < buf->data + buf->size) | 750 | uintptr_t buf_begin = (uintptr_t)buf->data; |
| 751 | |||
| 752 | if (data >= buf_begin && data < buf_begin + buf->size) | ||
| 751 | return buf; | 753 | return buf; |
| 752 | } | 754 | } |
| 753 | for (int i = 0; i < frame->nb_extended_buf; i++) { | 755 | for (int i = 0; i < frame->nb_extended_buf; i++) { |
| 754 | AVBufferRef *buf = frame->extended_buf[i]; | 756 | AVBufferRef *buf = frame->extended_buf[i]; |
| 755 | if (data >= buf->data && data < buf->data + buf->size) | 757 | uintptr_t buf_begin = (uintptr_t)buf->data; |
| 758 | |||
| 759 | if (data >= buf_begin && data < buf_begin + buf->size) | ||
| 756 | return buf; | 760 | return buf; |
| 757 | } | 761 | } |
| 758 | return NULL; | 762 | return NULL; |