mirror of
https://github.com/xenia-project/FFmpeg.git
synced 2024-11-24 12:09:55 +00:00
lavc/vp9: split a few assignment out of ifs
This commit is contained in:
parent
f4d95e0949
commit
0f8ae9d7b2
@ -50,10 +50,13 @@ static int vp9_frame_alloc(AVCodecContext *avctx, VP9Frame *f)
|
||||
VP9Context *s = avctx->priv_data;
|
||||
int ret, sz;
|
||||
|
||||
if ((ret = ff_thread_get_buffer(avctx, &f->tf, AV_GET_BUFFER_FLAG_REF)) < 0)
|
||||
ret = ff_thread_get_buffer(avctx, &f->tf, AV_GET_BUFFER_FLAG_REF);
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
|
||||
sz = 64 * s->sb_cols * s->sb_rows;
|
||||
if (!(f->extradata = av_buffer_allocz(sz * (1 + sizeof(struct VP9mvrefPair))))) {
|
||||
f->extradata = av_buffer_allocz(sz * (1 + sizeof(struct VP9mvrefPair)));
|
||||
if (!f->extradata) {
|
||||
goto fail;
|
||||
}
|
||||
|
||||
@ -82,11 +85,13 @@ static int vp9_frame_ref(AVCodecContext *avctx, VP9Frame *dst, VP9Frame *src)
|
||||
{
|
||||
int res;
|
||||
|
||||
if ((res = ff_thread_ref_frame(&dst->tf, &src->tf)) < 0) {
|
||||
res = ff_thread_ref_frame(&dst->tf, &src->tf);
|
||||
if (res < 0)
|
||||
return res;
|
||||
} else if (!(dst->extradata = av_buffer_ref(src->extradata))) {
|
||||
|
||||
dst->extradata = av_buffer_ref(src->extradata);
|
||||
if (!dst->extradata)
|
||||
goto fail;
|
||||
}
|
||||
|
||||
dst->segmentation_map = src->segmentation_map;
|
||||
dst->mv = src->mv;
|
||||
|
Loading…
Reference in New Issue
Block a user