Exemplo n.º 1
0
int opus_tags_copy(OpusTags *_dst,const OpusTags *_src){
    OpusTags dst;
    int      ret;
    opus_tags_init(&dst);
    ret=opus_tags_copy_impl(&dst,_src);
    if(OP_UNLIKELY(ret<0))opus_tags_clear(&dst);
    else *_dst=*&dst;
    return 0;
}
Exemplo n.º 2
0
int opus_tags_parse(OpusTags *_tags,const unsigned char *_data,size_t _len){
  if(_tags!=NULL){
    OpusTags tags;
    int      ret;
    opus_tags_init(&tags);
    ret=opus_tags_parse_impl(&tags,_data,_len);
    if(ret<0)opus_tags_clear(&tags);
    else *_tags=*&tags;
    return ret;
  }
  else return opus_tags_parse_impl(NULL,_data,_len);
}