History

avcodec/vp8: Check mutex init

Fixes: CID1598556 Unchecked return value

Michael Niedermayer committed 2 years ago

Commit 4ac74051 parent 300df411 file · +5 −1Browse files

Showing the changes to libavcodec (1 of 1 file). Show all

Unified · Split

libavcodec/vp8.c+5−1
@@ -247,7 +247,11 @@ int update_dimensions(VP8Context *s, int width, int height, int is_vp7) · 246 unmodified lines
247 return AVERROR(ENOMEM);247 return AVERROR(ENOMEM);
248 }248 }
249#if HAVE_THREADS249#if HAVE_THREADS
250 pthread_mutex_init(&s->thread_data[i].lock, NULL);250 ret = pthread_mutex_init(&s->thread_data[i].lock, NULL);
251 if (ret) {
252 free_buffers(s);
253 return AVERROR(ret);
254 }
251 pthread_cond_init(&s->thread_data[i].cond, NULL);255 pthread_cond_init(&s->thread_data[i].cond, NULL);
252#endif256#endif
253 }257 }

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t