| 231 | } RV60Context; |
| 232 | |
| 233 | static int progress_init(RV60Context *s, unsigned count) |
| 234 | { |
| 235 | if (s->nb_progress < count) { |
| 236 | void *tmp = av_realloc_array(s->progress, count, sizeof(*s->progress)); |
| 237 | if (!tmp) |
| 238 | return AVERROR(ENOMEM); |
| 239 | s->progress = tmp; |
| 240 | memset(s->progress + s->nb_progress, 0, (count - s->nb_progress) * sizeof(*s->progress)); |
| 241 | for (int i = s->nb_progress; i < count; i++) { |
| 242 | int ret = ff_thread_progress_init(&s->progress[i], 1); |
| 243 | if (ret < 0) |
| 244 | return ret; |
| 245 | s->nb_progress = i + 1; |
| 246 | } |
| 247 | } |
| 248 | |
| 249 | for (int i = 0; i < count; i++) |
| 250 | ff_thread_progress_reset(&s->progress[i]); |
| 251 | |
| 252 | return 0; |
| 253 | } |
| 254 | |
| 255 | static av_cold int rv60_decode_init(AVCodecContext * avctx) |
| 256 | { |
no test coverage detected