void task_release_frames(davs2_t *h)
{
    int i;

    /* release reference to all reference frames */
    for (i = 0; i < h->num_of_references; i++) {
        release_one_frame(h->fref[i]);
        h->fref[i] = NULL;
    }

    h->num_of_references = 0;

    /* release reference to the reconstructed frame */
    release_one_frame(h->fdec);
    h->fdec = NULL;
}
void task_release_frames(davs2_t *h)
{
    int i;

     
    for (i = 0; i < h->num_of_references; i++) {
        release_one_frame(h->fref[i]);
        h->fref[i] = NULL;
    }

    h->num_of_references = 0;

     
    release_one_frame(h->fdec);
    h->fdec = NULL;
}