| 258 | } |
| 259 | |
| 260 | static int avfilter_work( hb_filter_object_t * filter, |
| 261 | hb_buffer_t ** buf_in, hb_buffer_t ** buf_out ) |
| 262 | { |
| 263 | hb_filter_private_t * pv = filter->private_data; |
| 264 | hb_buffer_t * in = *buf_in; |
| 265 | |
| 266 | if (in->s.flags & HB_BUF_FLAG_EOF) |
| 267 | { |
| 268 | hb_buffer_t * out = filterFrame(pv, NULL); |
| 269 | hb_buffer_t * last = hb_buffer_list_tail(&pv->list); |
| 270 | if (last != NULL && last->s.start != AV_NOPTS_VALUE) |
| 271 | { |
| 272 | last->s.stop = last->s.start + last->s.duration; |
| 273 | } |
| 274 | hb_buffer_list_prepend(&pv->list, out); |
| 275 | hb_buffer_list_append(&pv->list, in); |
| 276 | *buf_out = hb_buffer_list_clear(&pv->list); |
| 277 | *buf_in = NULL; |
| 278 | return HB_FILTER_DONE; |
| 279 | } |
| 280 | |
| 281 | *buf_out = filterFrame(pv, buf_in); |
| 282 | |
| 283 | return HB_FILTER_OK; |
| 284 | } |
nothing calls this directly
no test coverage detected