assert(s->internal_buffer_count);
void avcodec_default_release_buffer(AVCodecContext *s, AVFrame *pic){    int i;    InternalBuffer *buf, *last, temp;    assert(pic->type==FF_BUFFER_TYPE_INTERNAL);    for(i=0; i<s->internal_buffer_count; i++){ //just 3-5 checks so is not worth to optimize        buf= &((InternalBuffer*)s->internal_buffer)[i];        if(buf->data[0] == pic->data[0])            break;    }    assert(i < s->internal_buffer_count);    s->internal_buffer_count--;    last = &((InternalBuffer*)s->internal_buffer)[s->internal_buffer_count];    temp= *buf;    *buf= *last;    *last= temp;    for(i=0; i<3; i++){        pic->data[i]=NULL;//        pic->base[i]=NULL;    }//printf("R%X\n", pic->opaque);}