avcodec/vp8: Check cond init

Fixes: CID1598563 Unchecked return value

Sponsored-by: Sovereign Tech Fund
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 9b76e49061)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
Michael Niedermayer 2024-05-26 23:50:40 +02:00
parent ea1e12e029
commit 02b37af177
No known key found for this signature in database
GPG Key ID: B18E8928B3948D64
1 changed files with 5 additions and 1 deletions

View File

@ -240,7 +240,11 @@ int update_dimensions(VP8Context *s, int width, int height, int is_vp7)
free_buffers(s);
return AVERROR(ret);
}
pthread_cond_init(&s->thread_data[i].cond, NULL);
ret = pthread_cond_init(&s->thread_data[i].cond, NULL);
if (ret) {
free_buffers(s);
return AVERROR(ret);
}
#endif
}