Fixes null pointer dereference
Unified · Split
| @@ -76,6 +76,9 @@ static int libquvi_read_header(AVFormatContext *s) · 75 unmodified lines | ||
| 76 | 76 | if (rc != QUVI_OK) |
| 77 | 77 | goto quvi_fail; |
| 78 | 78 | |
| 79 | + if (!(qc->fmtctx = avformat_alloc_context())) | |
| 80 | + goto quvi_fail; | |
| 81 | + | |
| 79 | 82 | if ((ret = ff_copy_whitelists(qc->fmtctx, s)) < 0) |
| 80 | 83 | goto end; |
| 81 | 84 | |