| 971 | } |
| 972 | |
| 973 | static av_cold int wv_alloc_frame_context(WavpackContext *c) |
| 974 | { |
| 975 | WavpackFrameContext **fdec = av_realloc_array(c->fdec, c->fdec_num + 1, sizeof(*c->fdec)); |
| 976 | |
| 977 | if (!fdec) |
| 978 | return -1; |
| 979 | c->fdec = fdec; |
| 980 | |
| 981 | c->fdec[c->fdec_num] = av_mallocz(sizeof(**c->fdec)); |
| 982 | if (!c->fdec[c->fdec_num]) |
| 983 | return -1; |
| 984 | c->fdec_num++; |
| 985 | c->fdec[c->fdec_num - 1]->avctx = c->avctx; |
| 986 | |
| 987 | return 0; |
| 988 | } |
| 989 | |
| 990 | static int wv_dsd_reset(WavpackContext *s, int channels) |
| 991 | { |
no test coverage detected