Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @@ -642,9 +639,9 @@ AVBufferRef *av_frame_get_plane_buffer(AVFrame *frame, int plane)
- return NULL;
- }
- -static AVFrameSideData *frame_new_side_data(AVFrame *frame,
- - enum AVFrameSideDataType type,
- - AVBufferRef *buf)
- +AVFrameSideData *av_frame_new_side_data_from_buf(AVFrame *frame,
- + enum AVFrameSideDataType type,
- + AVBufferRef *buf)
- {
- AVFrameSideData *ret, **tmp;
- @@ -652,17 +649,17 @@ static AVFrameSideData *frame_new_side_data(AVFrame *frame,
- return NULL;
- if (frame->nb_side_data > INT_MAX / sizeof(*frame->side_data) - 1)
- - goto fail;
- + return NULL;
- tmp = av_realloc(frame->side_data,
- (frame->nb_side_data + 1) * sizeof(*frame->side_data));
- if (!tmp)
- - goto fail;
- + return NULL;
- frame->side_data = tmp;
- ret = av_mallocz(sizeof(*ret));
- if (!ret)
- - goto fail;
- + return NULL;
- ret->buf = buf;
- ret->data = ret->buf->data;
- @@ -672,17 +669,18 @@ static AVFrameSideData *frame_new_side_data(AVFrame *frame,
- frame->side_data[frame->nb_side_data++] = ret;
- return ret;
- -fail:
- - av_buffer_unref(&buf);
- - return NULL;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement